Permalink
Browse files

Update documentation for count.

Remove documented but outdated condition parameter.
  • Loading branch information...
1 parent 800ce67 commit fc7d638b925a0b63c9080dd519d74723f4b61d7f @i0rek i0rek committed Jan 18, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/mongoid/finders.rb
View
@@ -26,13 +26,12 @@ def all
criteria
end
- # Returns a count of matching records in the database based on the
- # provided arguments.
+ # Returns a count of records in the database.
+ # If you want to specify conditions use where.
#
# @example Get the count of matching documents.
- # Person.count(:conditions => { :attribute => "value" })
- #
- # @param [ Array ] args The conditions.
+ # Person.count
+ # Person.where(title: "Sir").count
#
# @return [ Integer ] The number of matching documents.
def count

0 comments on commit fc7d638

Please sign in to comment.