From 4a0be8807c12d1615915d6319605a69bc2dc1061 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Thu, 9 Sep 2010 13:11:09 -0400 Subject: [PATCH] remove unnecessary call if operation is count then column_name will never be blank --- .../lib/active_record/relation/calculations.rb | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index a80ac40..a09f694 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -175,7 +175,6 @@ module ActiveRecord end distinct = options[:distinct] || distinct - column_name = :all if column_name.blank? && operation == "count" if @group_values.any? return execute_grouped_calculation(operation, column_name) -- 1.7.2