Show More
Commit Description:
Merged online-registration branch changes r297:303 into the trunk...
Commit Description:
Merged online-registration branch changes r297:303 into the trunk
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@303 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
db/migrate/20081204122651_add_activated_to_users.rb
| 15 lines
| 284 B
| text/x-ruby
| RubyLexer
|
|
r155 | class AddActivatedToUsers < ActiveRecord::Migration | ||
def self.up | ||||
add_column :users, :activated, :boolean, :default => 0 | ||||
User.find(:all).each do |user| | ||||
user.activated = true | ||||
user.save | ||||
end | ||||
end | ||||
def self.down | ||||
remove_column :users, :activated | ||||
end | ||||
end | ||||