Is there a way to do a subquery in rails without find_by_sql? specifically something like this: select families.* from families where id not in (select family_id from users where type = 'Student');