Method: Mongoid::PersistenceContext.get

Defined in:
lib/mongoid/persistence_context.rb

.get(object) ⇒ Mongoid::PersistenceContext

Get the persistence context for a particular class or model instance.

Examples:

Get the persistence context for a class or model instance.

PersistenceContext.get(model)

Parameters:

  • object (Object)

    The class or model instance.

Returns:



258
259
260
# File 'lib/mongoid/persistence_context.rb', line 258

def get(object)
  get_context(object)
end