i want to associate one model with 4 models. For example i call a first
model Spectacle and call others Hall1, Hall2, Hall3 and Hall4. All of
Halls have the same attributes: id and seat. Each Hall have 10 seats.
I want to create an spectacle on the database and associate it with any
Hall.
On 28 May 2014 14:30, Simon Eric li...@ruby-forum.com wrote:
i want to associate one model with 4 models. For example i call a first
model Spectacle and call others Hall1, Hall2, Hall3 and Hall4. All of
Halls have the same attributes: id and seat. Each Hall have 10 seats.
I want to create
does each hall have to be specifically designated as hallx?
and do halls exist independently of spectacle?
Assuming that halls exist independently, it sounds like having a join
table and position attributes on the join should work
spectacle
has_many :halls
spectacle_hall_join
3 matches
Mail list logo