Monday, March 15, 2010

Many-to-Many Relationship in Rails

Many-to-Many relationships in Rails come in 2 flavors.

  • has_and_belongs_to_many      -> for bare-bones join table

  • has_many :through                      -> for full join models when there is some data associated with the relationship that you want to keep track of

1 comment: