From ef4ffed660015772f67826e8aaa319febe84f271 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 14 Jan 2011 14:30:47 -0800 Subject: reduce some lasigns --- activerecord/lib/active_record/associations/association_proxy.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index f2de788522..b752f1fdc0 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -185,9 +185,8 @@ module ActiveRecord scope = target_klass.unscoped scope = scope.create_with(creation_attributes) scope = scope.apply_finder_options(@reflection.options.slice(:conditions, :readonly, :include)) - scope = scope.where(construct_owner_conditions) scope = scope.select(select_value) if select_value = self.select_value - scope + scope.where(construct_owner_conditions) end def select_value -- cgit v1.2.3