From d80334488ff5c83e63cca3fb70250e9002a2f0c3 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 2 Jul 2013 21:56:51 +0530 Subject: Removed support for deprecated `finder_sql` in associations. --- activerecord/lib/active_record/associations/has_many_association.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'activerecord/lib/active_record/associations/has_many_association.rb') diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index b632b0dfed..36d81a7402 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -58,8 +58,6 @@ module ActiveRecord def count_records count = if has_cached_counter? owner.send(:read_attribute, cached_counter_attribute_name) - elsif options[:finder_sql] - reflection.klass.count_by_sql(custom_counter_sql) else scope.count end -- cgit v1.2.3