diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-10-13 21:27:21 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2013-10-13 21:27:21 +0530 |
commit | 4ce643dbb5bd37e1f4662b37abc80a18078feba1 (patch) | |
tree | 87fd3541b7c2904337b6275d87d597307d7c8954 /activerecord/lib/active_record/associations/collection_association.rb | |
parent | 0df9149fd6b0ef4cd9003c1a9c406e2c586c9503 (diff) | |
download | rails-4ce643dbb5bd37e1f4662b37abc80a18078feba1.tar.gz rails-4ce643dbb5bd37e1f4662b37abc80a18078feba1.tar.bz2 rails-4ce643dbb5bd37e1f4662b37abc80a18078feba1.zip |
`Relation#count` doesn't use options anymore.
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 75f8990cf0..6b06a5f7fd 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -195,9 +195,7 @@ module ActiveRecord # Count all records using SQL. Construct options and pass them with # scope to the target class's +count+. - def count(column_name = nil, count_options = {}) - column_name, count_options = nil, column_name if column_name.is_a?(Hash) - + def count(column_name = nil) relation = scope if association_scope.distinct_value # This is needed because 'SELECT count(DISTINCT *)..' is not valid SQL. |