Reputation: 2895
Something like Model.find(array_of_ids, :conditions => {:attribute => "something"})
Where I will be returned all entries where attribute = something, but only from within that array of ids.
Upvotes: 0
Views: 155
Reputation: 1301
Model.where('id in (?)', array_of_ids).where(attribute: "something")
Upvotes: 3