If I have the following (abridged) setup:
class User < ActiveRecord::Base
has_many :groups, :through => :memberships
end
class Group < ActiveRecord::Base
has_many :users, :through => :memberships
end
and my memberships table has:
user_id
group_id
joined_date
Let’s say I’ve got: @group.users.each do |user| … end
How do I access their joined_date attribute? It’s gotta be easy but I can’t seem to figure it out. Do I need to write extra model code to pull out a single membership record?
Thanks,
Chad