提交 f65ab3b2 编写于 作者: J Jeremy Kemper

improve example in migrations docs, closes #6370

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 02dc646d
......@@ -157,7 +157,7 @@ def initialize(version)
# 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 @@ def initialize(version)
# ...
# 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
# ...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册