From 4ce643dbb5bd37e1f4662b37abc80a18078feba1 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 13 Oct 2013 21:27:21 +0530 Subject: `Relation#count` doesn't use options anymore. --- activerecord/lib/active_record/associations/collection_association.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'activerecord/lib/active_record/associations/collection_association.rb') 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. -- cgit v1.2.3