Method: Mongoid::Extensions::ObjectId::ClassMethods#evolve

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

#evolve(object) ⇒ BSON::ObjectId

Evolve the object into a mongo-friendly value to query with.

Examples:

Evolve the object.

ObjectId.evolve(id)

Parameters:

  • object (Object)

    The object to evolve.

Returns:

  • (BSON::ObjectId)

    The object id.



31
32
33
# File 'lib/mongoid/extensions/object_id.rb', line 31

def evolve(object)
  object.__evolve_object_id__
end