class User has_many :group_roles has_many :groups, :through=>:group_roles end class GroupRole belongs_to :user belongs_to :group end class Group has_many :group_roles has_many :users, :through=>:group_roles end group_arel = Group.where(:active=>true).where(:important=>'very') groups = group_arel.to_a # returns [group, group, group] user_sql = group_arel.joins(:users).select("users.*").to_sql User.find_by_sql(user_sql) # return [user, user, user] for all the users of all the groups on #17 # What I'd like to be able to do user_arel = User.take_everything_but_the_select_from(group_arel) amended_user_arel = user_arel.where(:name=>"bob") amended_user_arel.to_a # returns [user, user, user]