Reputation: 28174
Assuming I want to get 3 documents which fit one of these attributes
Class Question:
name=>a, topic=>b
name=>c, topic=>d
name=>e, topic=>f
What is the appropriate syntax for mongoid to get these?
Upvotes: 0
Views: 102
Reputation: 12868
According to mongoid query syntax:
Model.any_of({:name => a, :topic => b},
{:name => c, :topic => d},
{:name => e, :topic => f})
Upvotes: 1