lib/lotus/model/adapters/mongodb_adapter.rb
def last(collection)
          _first(
            query(collection).desc(:_id)
          )
        end
# Returns the last record in the given collection.
#
# @param collection [Symbol] the target collection (it must be mapped).
#
# @return [Object] the last entity
#
# @api private
Returns the last record in the given collection.
Returns the last record in the given collection .
def last(collection)
          _first(
            query(collection).desc(:_id)
          )
        end
def last ( collection ) _first ( query ( collection ) . desc ( :_id ) ) end
Returns the last record in the given collection.
Returns the last record in the given collection .
the last entity
the last entity
Object
collection
the target collection (it must be mapped).
the target collection ( it must be mapped ) .
api
None