Module: MongoMapper::Plugins::Persistence

Extended by:
ActiveSupport::Concern
Included in:
Document, EmbeddedDocument
Defined in:
lib/mongo_mapper/plugins/persistence.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#collectionObject



60
61
62
# File 'lib/mongo_mapper/plugins/persistence.rb', line 60

def collection
  _root_document.class.collection
end

#databaseObject



64
65
66
# File 'lib/mongo_mapper/plugins/persistence.rb', line 64

def database
  _root_document.class.database
end