提交 316cb1f7 编写于 作者: E Ethan Mick

Updated migrations.textile to change :integer on line 807 to :boolean, as it...

Updated migrations.textile to change :integer on line 807 to :boolean, as it was earlier in the example. :flag is a boolean, not an integer. (defaults to false)
上级 bbe31cc5
......@@ -804,7 +804,7 @@ class AddFlagToProduct < ActiveRecord::Migration
end
def change
add_column :products, :flag, :integer
add_column :products, :flag, :boolean
Product.reset_column_information
Product.all.each do |product|
product.update_attributes!(:flag => false)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册