You want a habtm relationship, or a :through a join model (named like
‘Siding’ to demonstrate its intention to link Side to something).
Consider also that i may order two sides of the same item with one
main…
you need a join table to model that.
But I’m not shure how to create this with active Record.
You want a habtm relationship, or a :through a join model (named like
‘Siding’ to demonstrate its intention to link Side to something).
Consider also that i may order two sides of the same item with one main…
you need a join table to model that.
Also have a look at the Rails Guide on ActiveRecord Associations.
That may help to clarify things.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.