views:

56

answers:

1

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

A: 

Try

has_many :committee_clubs, :through => :committee, :source => :clubs
has_many :membership_clubs, :through => :membership, :source => :clubs
Koterpillar