Permalink
Browse files

Merge pull request #1607 from i0rek/update_count_documentation

Update documentation for count.
  • Loading branch information...
durran committed Jan 18, 2012
2 parents 9d00d00 + fc7d638 commit 55118993851567eaee1c174717e65345eb14211a
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 5511899

Please sign in to comment.