Forum: Ruby on Rails has_many :through => ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ben J. (Guest)
on 2007-05-16 13:06
I am having trouble setting up a relationship using the through option.
Say you have the follow:

A company has many company branches and facilities. A user must belong
to either a company branch or a facility.

I just want to set up a relationship for the company that is through
both the company branches and facilities. How can I accomplish something
similar to:

has_many :users, :through => [:company_branches, :facilities]

Thanks for your help.
This topic is locked and can not be replied to.