Module | Mongoid::Criterion::Builder |
In: |
lib/mongoid/criterion/builder.rb
|
This module defines criteria behavior for building documents for specified conditions.
Build a document given the selector and return it. Complex criteria, such as $in and $or operations will get ignored.
@example build the document.
Person.where(:title => "Sir").build
@example Build with selectors getting ignored.
Person.where(:age.gt => 5).build
@return [ Document ] A non-persisted document.
@since 2.0.0