Displaying 1 result from an estimated 1 matches for "speclines".
2007 Dec 20
0
polymorphic has_many :through Vs Inheritance
...help, I
think its primarily a design question.
A Spec consists of many Nests and many Parts. Nests contain Parts.
Here''s what I have, which works well currently:
---------------------------------------------------
class Spec << ActiveRecord::Base
has_many :parts, :through => :speclines
has_many :nests, :through => :speclines
end
class Specline << ActiveRecord::Base
belongs_to :spec
belongs_to :part
belongs_to :nest
end
class Part << ActiveRecord::Base
has_many :specs, :through => :speclines
end
class Nest << ActiveRecord::Base
has_man...