lib/lotus/model/adapters/mongodb_adapter.rb
# Creates a record in the database for the given entity.
# It assigns the `id` attribute, in case of success.
#
# @param collection [Symbol] the target collection (it must be mapped).
# @param entity [#id=] the entity to create
#
# @return [Object] the entity
#
# @api private
Creates a record in the database for the given entity.
It assigns the `id` attribute, in case of success.
Creates a record in the database for the given entity . It assigns the ` id ` attribute in case of success .
def create(collection, entity)
          command(
            _collection(collection)
          ).create(entity)
        end
def create ( collection , entity ) command ( _collection ( collection ) ) . create ( entity ) end
Creates a record in the database for the given entity.
Creates a record in the database for the given entity .
None
Object
collection
the target collection (it must be mapped).
the target collection ( it must be mapped ) .
entity
the entity to create
the entity to create
api
None