search for: components_elements

Displaying 1 result from an estimated 1 matches for "components_elements".

2006 Mar 24
1
Multiple table relationships
...ut with some Rails development and have the following table structure. I understand how to do a two table has many join but I actually need to relate a third table. Here is my structure: components id name updated_at elements id name updated_at element_types id name updated_at components_elements component_id element_id element_type_id updated_at My Component model has the following: class Component < ActiveRecord::Base has_and_belongs_to_many :elements end I haven''t actually added anything to my Element model but suspect that it also needs a habtm association. My b...