Reputation: 445
So i know i can do something like this Model.Where('field LIKE ?','%mystring%')
to get all records containing my string inside my specified field.
But is there to make it check through an array of strings rather than a single string ?
Upvotes: 0
Views: 162
Reputation: 568
This should do in PostgreSQL:
Model.where("field ILIKE any (array[?])", ["%mystring1%", "%mystring2%"])
Upvotes: 1