Wednesday, July 23, 2008

Rails Active Record Assocications

From Agile Development with Ruby on Rails:

"There’s an easy way to remember where to put belongs_to declarations: if a table has foreign keys, the corresponding model should have a belongs_to for each."


Never look this up again!

No comments: