I want to do
Model.where('id = ?', [array of values])
How do I accomplish this look up without chaining OR statements together?
From here it appears to be done using an SQL in statement:
in
Model.where('id IN (?)', [array of values])
Or more simply, as kdeisz pointed out (Using Arel to create the SQL query):
Model.where(id: [array of values])
2.1m questions
2.1m answers
60 comments
57.0k users