lib/mongoid/finders.rb in mongoid-3.0.0.rc vs lib/mongoid/finders.rb in mongoid-3.0.0
- old
+ new
@@ -50,11 +50,11 @@
# +Document+ based on that id. If a +Symbol+ and +Hash+ is provided then
# it will attempt to find either a single +Document+ or multiples based
# on the conditions provided and the first parameter.
#
# @example Find a single document by an id.
- # Person.find(BSON::ObjectId)
+ # Person.find(Moped::BSON::ObjectId)
#
# @param [ Array ] args An assortment of finder options.
#
# @return [ Document, nil, Criteria ] A document or matching documents.
def find(*args)
@@ -110,24 +110,20 @@
end
# Find the first +Document+ given the conditions.
#
# @example Find the first document.
- # Person.first(:conditions => { :attribute => "value" })
+ # Person.first
#
- # @param [ Array ] args The conditions with options.
- #
# @return [ Document ] The first matching document.
def first
with_default_scope.first
end
# Find the last +Document+ given the conditions.
#
# @example Find the last document.
- # Person.last(:conditions => { :attribute => "value" })
- #
- # @param [ Array ] args The conditions with options.
+ # Person.last
#
# @return [ Document ] The last matching document.
def last
with_default_scope.last
end