join same rails models twice, eg people has_many clubs through membership AND people has_many clubs through committee
- by Ben
Models:
* Person
* Club
Relationships
* Membership
* Committee
People should be able to join a club (Membership)
People should be able to be on the board of a club (Committee)
For my application these involve vastly different features, so I would prefer not to use a flag to set (is_board_member) or similar.
I find myself wanting to write:
People
has_many :clubs :through = :membership # :as = :member? :foreign_key = :member_id?
has_many :clubs :through = :committee # as (above)
but I'm not really sure how to stitch this together