Topic: Question on :through
I'm having a bit of a problem modeling what has turned out to be a complex relationship. I've got the basic has_many :through relationship down, but I am trying to add one more dimension to one end of the relationship. Here's some of the code.
class Person < ActiveRecord::Base
has_many :groups, :through => :memberships
class Membership < ActiveRecord::Base
class Group < ActiveRecord::Base
has_many :people, :through => :memberships
class Rank < ActiveRecord::Base
I want to show rank of a person within a group (e.g. owner, assistant, communications), but I am not sure where to add this part of the relationship. The code example has my guess, but I'd like to be able to do person.group.rank or something similar.