On Oct 6, 2010, at 3:34 PM, Jonathan Gill wrote:
Hi allNot really sure how to put the subject as I know what I want to do, but really not sure how (or if) I can do it. What I really want to do is this ; people.find_by_name(:all, :conditions => {"name = ?", "john", "bob", "mike", "fred","will"} ) or possibly people.find_by_name(:all, :conditions => {"name =?", "john"} ) Ive no idea if this can be done, or if it can, how to do it. Can someone clue me in? Many thanks Jonathan
If you want a dynamic finder on name that returns any number of Person records, then you simply want:
Person.find_all_by_name(['john', 'bob', 'mike', 'fred', 'will']) -Rob Rob Biedenharn [email protected] http://AgileConsultingLLC.com/ [email protected] http://GaslightSoftware.com/ -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

