Sha256: 5690e4e777c4b56c3b7fbcd7f20dba3f9d0146a66608d55e92b072d3d7723f0f

Contents?: true

Size: 557 Bytes

Versions: 164

Compression:

Stored size: 557 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Hash #:nodoc:

      # Adds functionality for criteria scoping/merging.
      module Scoping

        # Get the hash scoped for criteria merges.
        #
        # @example Get the hash.
        #   { :field => "value" }.scoped
        #
        # @param [ Array ] args The arguments (ignored).
        #
        # @return [ Hash ] The hash unmodified.
        #
        # @since 1.0.0
        def as_conditions(*args)
          self
        end
      end
    end
  end
end

Version data entries

164 entries across 72 versions & 3 rubygems

Version Path
mongoid-2.4.3 lib/mongoid/extensions/hash/scoping.rb
mongoid-2.4.2 lib/mongoid/extensions/hash/scoping.rb
mongoid-2.4.1 lib/mongoid/extensions/hash/scoping.rb
mongoid-2.4.0 lib/mongoid/extensions/hash/scoping.rb