Forum: Ruby on Rails HABTM pregunta

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.
Chris H. (Guest)
on 2009-05-08 02:08
(Received via mailing list)
I have 2 habtm relations:

FORM <- HABTM-> COMPANIES
FORM <- HABTM -> SITES

Is there an easy way to do a query like:

Find out what sites belong to what company related to the form?

Also is there a better or more efficient way of setting this kind of
scenario up?

The FORM can have multiple companies associated as well as multiple
sites belonging to each company.
This topic is locked and can not be replied to.