Now I have group_id sa for example 68
What I want is from contact_email_addresses table get all the
emailaddress with contact_email_address_type_id=2 for the contacts with
this group_id under the condition in the user_groups table
group_user_type_id=2
How can I do this?
Something to that effect should work… however it depends how you
have your relationships setup… this would work too…
contact_type = ContactEmailAddressType.find(2)
contact_type.contact_email_addresses.find(:all, :coditions =>
‘group_user_type_id = 2’, :include => ‘user_groups’ )