accessing :through table attributes

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

sorry for the spaces sent html on accident

Hi --

Ah... that's perfect. I was trying to pull a list of members and get the membership info from that as opposed to pulling memberships and getting member info.

Thanks!