Skip to content

Commit 5678399

Browse files
committed
Fix belong_to typo in Active Record Associations guide
1 parent 6dda150 commit 5678399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/association_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ In our example, `imageable_id` could be the ID of either an `Employee` or a
16231623
either `Employee` or `Product`.
16241624

16251625
While creating the polymorphic association manually is acceptable, it is instead
1626-
recommended to use `t.references` or its alias `t.belong_to` and specify
1626+
recommended to use `t.references` or its alias `t.belongs_to` and specify
16271627
`polymorphic: true` so that Rails knows that the association is polymorphic, and
16281628
it automatically adds both the foreign key and type columns to the table.
16291629

0 commit comments

Comments
 (0)