lib/mongoid/criteria/queryable/selector.rb
# Store the value in the selector for the provided key. The selector will
# handle all necessary serialization and localization in this step.
#
# @example Store a value in the selector.
#   selector.store(:key, "testing")
#
# @param [ String, Symbol ] key The name of the attribute.
# @param [ Object ] value The value to add.
#
# @return [ Object ] The stored object.
Store the value in the selector for the provided key. The selector will
handle all necessary serialization and localization in this step.
Store the value in the selector for the provided key . The selector will handle all necessary serialization and localization in this step .
def store(key, value)
          name, serializer = storage_pair(key)
          if multi_selection?(name)
            store_name = name
            store_value = evolve_multi(value)
          else
            store_name, store_value = store_creds(name, serializer, value)
          end
          super(store_name, store_value)
        end
def store ( key , value ) name , serializer = storage_pair ( key ) if multi_selection? ( name ) store_name = name store_value = evolve_multi ( value ) else store_name , store_value = store_creds ( name , serializer , value ) end super ( store_name , store_value ) end
Store the value in the selector for the provided key.
Store the value in the selector for the provided key .
The stored object.
The stored object .
 Object 
key
<not_specific>
value
<not_specific>
<not_specific>
value The value to add.
value The value to add .
example
Store a value in the selector. selector.store(:key, "testing")
Store a value in the selector . selector . store ( : key " testing " )