mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix wrong example for count method with block [ci skip]
Thanks @splattael.
This commit is contained in:
parent
e2f5f01675
commit
959a36084a
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ module ActiveRecord
|
|||
# Person.count(:age, distinct: true)
|
||||
# # => counts the number of different age values
|
||||
#
|
||||
# Person.where("age > 26").count { |person| gender == 'female' }
|
||||
# Person.where("age > 26").count { |person| person.gender == 'female' }
|
||||
# # => queries people where "age > 26" then count the loaded results filtering by gender
|
||||
def count(column_name = nil, options = {})
|
||||
if block_given?
|
||||
|
|
Loading…
Reference in a new issue