You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -402,7 +402,7 @@ class CreateSuppliers < ActiveRecord::Migration[5.0]
402
402
end
403
403
```
404
404
405
-
NOTE: Using `t.integer :supplier_id` makes the foreign key naming obvious and explicit. In current versions of Rails, you can abstract away this implementation detail by using `t.references :supplier` instead.
405
+
NOTE: Using `t.bigint :supplier_id` makes the foreign key naming obvious and explicit. In current versions of Rails, you can abstract away this implementation detail by using `t.references :supplier` instead.
406
406
407
407
### Choosing Between `has_many :through` and `has_and_belongs_to_many`
408
408
@@ -466,11 +466,11 @@ Similarly, you can retrieve `@product.pictures`.
466
466
If you have an instance of the `Picture` model, you can get to its parent via `@picture.imageable`. To make this work, you need to declare both a foreign key column and a type column in the model that declares the polymorphic interface:
0 commit comments