# simply inner join
Member.find(:first, :joins=>:group)
=> SELECT * FROM members INNER JOIN groups ON groups.id = members.group_id LIMIT 1
# two inner joins
Member.count(:joins=>[:group, :profile])
=> SELECT count(*) AS count_all FROM members
INNER JOIN groups ON groups.id = members.group_id
INNER JOIN profiles ON profiles.member_id = members.id
# symbol and raw SQL
Member.find(:all, :joins=>[:group, "INNER JOIN addresses USING(address_id)"])
=> SELECT * FROM members
INNER JOIN groups ON groups.id = members.group_id
INNER JOIN addresses USING(address_id)
Member.find(:first, :joins=>:group)
=> SELECT * FROM members INNER JOIN groups ON groups.id = members.group_id LIMIT 1
# two inner joins
Member.count(:joins=>[:group, :profile])
=> SELECT count(*) AS count_all FROM members
INNER JOIN groups ON groups.id = members.group_id
INNER JOIN profiles ON profiles.member_id = members.id
# symbol and raw SQL
Member.find(:all, :joins=>[:group, "INNER JOIN addresses USING(address_id)"])
=> SELECT * FROM members
INNER JOIN groups ON groups.id = members.group_id
INNER JOIN addresses USING(address_id)