From 7021b6b851c1567a73eae5e74eba437a52b112bf Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 23 Dec 2010 20:52:56 +0000 Subject: Remove custom_select param from construct_select, as it isn't used --- .../lib/active_record/associations/through_association_scope.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb index fa84de533f..415fc53e1c 100644 --- a/activerecord/lib/active_record/associations/through_association_scope.rb +++ b/activerecord/lib/active_record/associations/through_association_scope.rb @@ -73,9 +73,9 @@ module ActiveRecord end end - def construct_select(custom_select = nil) - distinct = "DISTINCT #{@reflection.quoted_table_name}.*" if @reflection.options[:uniq] - custom_select || @reflection.options[:select] || distinct + def construct_select + @reflection.options[:select] || + @reflection.options[:uniq] && "DISTINCT #{@reflection.quoted_table_name}.*" end def construct_joins -- cgit v1.2.3