提交 959a3608 编写于 作者: C Carlos Antonio da Silva

Fix wrong example for count method with block [ci skip]

Thanks @splattael.
上级 e2f5f016
......@@ -17,7 +17,7 @@ module Calculations
# 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?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册