multiple has_many :through

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 ;; 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?