# Has\_many :through =\>?

**URL:** <https://www.ruby-forum.com/t/has-many-through/104282>\
**Category:** Rails\
**Created:** [May 16, 2007, 11:06am UTC](https://www.ruby-forum.com/t/has-many-through/104282 "2007-05-16T11:06:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [May 16, 2007, 11:06am UTC](https://www.ruby-forum.com/t/has-many-through/104282/1 "2007-05-16T11:06:00Z")

</div>

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.
