Hi,
I'm trying to do an search for multiple possible values in one
database field. I have an array and want to find any of the values in
the array in the database and return the results.
So basically
arr = ['item1', 'item2', 'item3']
and I want to Model.find :all, :conditions => {:items => arr}
and find all the entries where :items equals any of the strings in
array.
What is the preferred way to do this?
Thanks,
JB
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---