Method: Mongoid::Extensions::Hash#mongoize

Defined in:
lib/mongoid/extensions/hash.rb

#mongoizeHash | nil

Turn the object from the ruby type we deal with to a Mongo friendly type.

Examples:

Mongoize the object.

object.mongoize

Returns:

  • (Hash | nil)

    The object mongoized or nil.



82
83
84
# File 'lib/mongoid/extensions/hash.rb', line 82

def mongoize
  ::Hash.mongoize(self)
end