lib/mongoid/criteria/marshalable.rb
# Resets the criteria object after a Marshal.load
#
# @example Load the criteria.
#   Marshal.load(criteria)
#
# @param [ Array ] data The raw data.
Resets the criteria object after a Marshal.load
Resets the criteria object after a Marshal . load
def marshal_load(data)
        @scoping_options, raw_selector, raw_options = data.pop(3)
        @klass, driver, @inclusions, @documents, @strategy, @negating = data
        if driver == :mongo1x
          raise NotImplementedError, "Mongoid no longer supports marshalling with driver version 1.x."
        end
        @selector = load_hash(Queryable::Selector, raw_selector)
        @options = load_hash(Queryable::Options, raw_options)
      end
def marshal_load ( data ) @scoping_options , raw_selector , raw_options = data . pop ( 3 ) @klass , driver , @inclusions , @documents , @strategy , @negating = data if driver == :mongo1x raise NotImplementedError , "Mongoid no longer supports marshalling with driver version 1.x." end @selector = load_hash ( Queryable :: Selector , raw_selector ) @options = load_hash ( Queryable :: Options , raw_options ) end
Resets the criteria object after a Marshal.load
Resets the criteria object after a Marshal . load
data
<not_specific>
<not_specific>
data The raw data.
data The raw data .
example
Load the criteria. Marshal.load(criteria)
Load the criteria . Marshal . load ( criteria )