diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-31 10:07:43 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-31 10:07:43 -0300 |
commit | 959a36084a75ed9d256276995dc3d3c433bc39e7 (patch) | |
tree | 847bb68d719669bc2f28fb4b7c7d1fd659e77214 /activerecord | |
parent | e2f5f01675f3c575e820532ab7cce6fe068ecb28 (diff) | |
download | rails-959a36084a75ed9d256276995dc3d3c433bc39e7.tar.gz rails-959a36084a75ed9d256276995dc3d3c433bc39e7.tar.bz2 rails-959a36084a75ed9d256276995dc3d3c433bc39e7.zip |
Fix wrong example for count method with block [ci skip]
Thanks @splattael.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index ad49c80e4f..54c93332bb 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -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? |