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])
1.4m articles
1.4m replys
5 comments
57.0k users