Forum: Ruby on Rails many-to-many-to-many examples / tutorials / best practice

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
933c05ef3dbe1454bd213bc08777ef63?d=identicon&s=25 macarthy (Guest)
on 2007-03-02 17:38
(Received via mailing list)
Has anyone got or seen a "many to many to many" example/ tutorial
anywhere ?

E.g. a model to handle ,  teacher , room , period

So

teacherA   is in room 1 at 11-12 oclock  or
teacherA  and B  is in room 2 at 12 - 1  oclock

I want to know what the best way to model this is ?  And how to
display things like

Room 1
- 11 -12 Teacher A
- 12 - 1  Teacher & teacher B
ROom 2
 etc..

or

Teacher A
 11-12 Room1
 12 -1  room 2

etc..

Thanks
72ee7b478a235f646c3495f03ebbe676?d=identicon&s=25 Andrew Stewart (Guest)
on 2007-03-05 10:30
(Received via mailing list)
On 2 Mar 2007, at 16:38, macarthy wrote:
> Has anyone got or seen a "many to many to many" example/ tutorial
> anywhere ?

Have a look at Josh Susser's Many to Many Dance-Off.  It's not quite
what you are after but it might help you out:

http://blog.hasmanythrough.com/2006/4/20/many-to-m...

Also see his other articles on this kind of thing:

http://blog.hasmanythrough.com/associations

Regards,
Andy Stewart
This topic is locked and can not be replied to.