Take the 2-minute tour ×

I have a User model which has many Committees a Committee also belongs to a user.

Because users are a mixture of Admins and regular web users, I've developed a new concept, where a User can favorite a Committee.

Is it possible to associate the User and Committee models in a second way?

Where a user:

has_many :favorites
has_many :committees, through: :favorites

Obviously this will collide with the above User.first.committees but is there a way I could use another noun but still keep the basic through logic?

This would be awesome if possible.

share|improve this question
add comment

1 Answer

Yes you can have two associations to the same model. Something like this.

has_many :committees
has_many :favorites
has_many :favorite_committees, through: :favorites

Thus you will have three models User, Committee and Favorite.

You can also refer this.


share|improve this answer
Mixing UK and US spelling there. –  GeorgeMillo Aug 19 '13 at 1:44
Sorry about that. Corrected. :) –  Bot Aug 19 '13 at 1:47
add comment

Your Answer


