diff options
-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 # ... |