module Mongoid::Contextual::Queryable

Mixin module which adds methods to Mongoid::Criteria that indicate the criteria query result will be an empty set.

Attributes

collection[R]

@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context. @attribute [r] klass The klass for the criteria.

criteria[R]

@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context. @attribute [r] klass The klass for the criteria.

klass[R]

@attribute [r] collection The collection to query against. @attribute [r] criteria The criteria for the context. @attribute [r] klass The klass for the criteria.

Public Instance Methods

blank?() click to toggle source

Is the enumerable of matching documents empty?

@example Is the context empty?

context.blank?

@return [ true | false ] If the context is empty.

# File lib/mongoid/contextual/queryable.rb, line 22
def blank?
  !exists?
end
Also aliased as: empty?
empty?()
Alias for: blank?