Friday, March 09, 2007

Modeling Associations of database tables

Model:You need to add directives that tell Rails about the associationsbetween entities—that is, the details of the has and belongs_to relationships.Associations are part of the ActiveRecord database-handling library. They’re a kind of inter-entity modeling subsystem, in which you tell Rails what you consider the relationships between entities to be and, assuming the table and field names you’ve chosen mesh with what you’ve asserted, Rails responds by handing you a set of programming features that let you manipulate those relationships easily.

No comments: