1
0
Fork 0
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:
Carlos Antonio da Silva 2012-05-31 10:07:43 -03:00
parent e2f5f01675
commit 959a36084a

View file

@ -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?