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.
Problems:
How can i do this association in rails?
It is possible to do this type of association?
How can i get all of Hall's seats through spectacle that i created?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cd4387b9642d9a6892bbcf6bccb3a361%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment