diff options
Diffstat (limited to 'guides/source/migrations.md')
-rw-r--r-- | guides/source/migrations.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md index 508e52a77c..e6d1e71f5e 100644 --- a/guides/source/migrations.md +++ b/guides/source/migrations.md @@ -314,7 +314,7 @@ will produce a migration that looks like this class AddDetailsToProducts < ActiveRecord::Migration def change add_column :products, :price, precision: 5, scale: 2 - add_reference :products, :user, polymorphic: true, index: true + add_reference :products, :supplier, polymorphic: true, index: true end end ``` @@ -376,7 +376,7 @@ create_join_table :products, :categories, column_options: {null: true} will create the `product_id` and `category_id` with the `:null` option as `true`. -You can pass the option `:table_name` with you want to customize the table +You can pass the option `:table_name` when you want to customize the table name. For example, ```ruby @@ -841,7 +841,6 @@ class AddFlagToProduct < ActiveRecord::Migration reversible do |dir| dir.up { Product.update_all flag: false } end - Product.update_all flag: false end end ``` |