has_one, has_many and belongs_to in ActiveRecord
The table with the foreign key in it belongs_to the table that that foreign key references.
The table with the referenced primary key in it has_one or has_many of the table with the foreign key in it.
I will not forget this again!
About this entry
You’re currently reading “ has_one, has_many and belongs_to in ActiveRecord ,” an entry on bluebones.net
- Published:
- 2008.01.06
- Category:
- Programming
No comments
Jump to comment form | comments rss [?] | trackback uri [?]