# Multiple has\_many :through

**URL:** <https://www.ruby-forum.com/t/multiple-has-many-through/87589>\
**Category:** Rails\
**Created:** [March 4, 2007, 3:46am UTC](https://www.ruby-forum.com/t/multiple-has-many-through/87589 "2007-03-04T03:46:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claudio\_PSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9e8a1a/32.png) [@Claudio\_PSSSSSSS](https://www.ruby-forum.com/u/Claudio_PSSSSSSS)\
**Post date:** [March 4, 2007, 3:46am UTC](https://www.ruby-forum.com/t/multiple-has-many-through/87589/1 "2007-03-04T03:46:21Z")

</div>

hi,  
simplifying I’ve this:

user -\> membership -\> group -\> grant -\> right  
user has\_many group through membership and group has\_many right  
through grant.  
I can fetch the groups’ rights well, doing some console stuff like  
@user.groups.each do |group| ;; group.rights.each do |right| ;; puts  
right.name ;; end ;; end etc.  
it would be very powerful to be able to do @user.rights directly  
with :uniq instead of querying groups’ rights, anybody can think of an  
association like this?
