lib/mongoid/criteria/queryable/smash.rb
# Get the pair of objects needed to store the value in a hash by the
# provided key. This is the database field name and the serializer.
#
# @api private
#
# @example Get the name and serializer.
#   smash.storage_pair("id")
#
# @param [ Symbol, String ] key The key provided to the selection.
#
# @return [ Array<String, Object> ] The name of the db field and
#   serializer.
Get the pair of objects needed to store the value in a hash by the
provided key. This is the database field name and the serializer.
Get the pair of objects needed to store the value in a hash by the provided key . This is the database field name and the serializer .
def storage_pair(key)
          field = key.to_s
          name = Fields.database_field_name(field, associations, aliases, aliased_associations)
          [ name, get_serializer(name) ]
        end
def storage_pair ( key ) field = key . to_s name = Fields . database_field_name ( field , associations , aliases , aliased_associations ) [ name , get_serializer ( name ) ] end
Get the pair of objects needed to store the value in a hash by the
provided key.
Get the pair of objects needed to store the value in a hash by the provided key .
The name of the db field and serializer.
The name of the db field and serializer .
 Array<String, Object> 
key
<not_specific>
<not_specific>
key The key provided to the selection.
key The key provided to the selection .
api
None
example
Get the name and serializer. smash.storage_pair("id")
Get the name and serializer . smash . storage_pair ( " id " )