diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-09 22:05:50 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-09 22:05:50 +0000 |
commit | f65ab3b233e112679fc7a183b488c5356a01c96c (patch) | |
tree | f08922e7a5ea1dd50ae50a9412b868fc16d21e95 | |
parent | 02dc646d558bf4c3ff433287d6e392dd02da22a9 (diff) | |
download | rails-f65ab3b233e112679fc7a183b488c5356a01c96c.tar.gz rails-f65ab3b233e112679fc7a183b488c5356a01c96c.tar.bz2 rails-f65ab3b233e112679fc7a183b488c5356a01c96c.zip |
improve example in migrations docs, closes #6370
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index cca46f1df4..5402cf2446 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -157,7 +157,7 @@ module ActiveRecord # add_column :people, :salary, :integer # Person.reset_column_information # Person.find(:all).each do |p| - # p.salary = SalaryCalculator.compute(p) + # p.update_attribute :salary, SalaryCalculator.compute(p) # end # end # end @@ -177,7 +177,7 @@ module ActiveRecord # ... # say_with_time "Updating salaries..." do # Person.find(:all).each do |p| - # p.salary = SalaryCalculator.compute(p) + # p.update_attribute :salary, SalaryCalculator.compute(p) # end # end # ... |