I’m trying to do something straight forward such as:
User.all(:criteria => {:project_id => 2})
This returns an instance of Mongoid::Criteria
What can I do with this criteria? What if I just want the array of documents returned for further evaluation?
Criteriais something likeRelationobject inActiveRecordYou can use it this way
This will return
[]if there is no any user