i''ve looking for the sql to do a comparison of objects in a model''s has_many objects. specifically it''s a simple model: class Person has_many :things end class Things belongs_to: person end i can save the person and their 3 (or however many) things. now i just need a way to search their 3 things against all other people''s 3 things to see if they''re the same. for instance. @person.thing 1 = ''baseball'' @person.thing 2 = ''tire'' @person.thing 3 = ''shovel'' what''s the sql (and it it possible with #find to return a collection of people with the same things that the person searching using 3 text fields has? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---