Module: Mongoid::Extensions::Hash::Scoping

Included in:
Hash
Defined in:
lib/mongoid/extensions/hash/scoping.rb

Overview

Adds functionality for criteria scoping/merging.

Instance Method Summary collapse

Instance Method Details

#as_conditions(*args) ⇒ Hash

Get the hash scoped for criteria merges.

Examples:

Get the hash.

{ :field => "value" }.scoped

Parameters:

  • args (Array)

    The arguments (ignored).

Returns:

  • (Hash)

    The hash unmodified.

Since:

  • 1.0.0



19
20
21
# File 'lib/mongoid/extensions/hash/scoping.rb', line 19

def as_conditions(*args)
  self
end