From 451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 1 Feb 2011 17:20:24 -0200 Subject: scope is always a Relation --- activerecord/lib/active_record/associations/association_proxy.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 84f868ec43..07fff7f7d7 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -188,9 +188,7 @@ module ActiveRecord if select = select_value scope = scope.select(select) end - if Relation === scope - scope = scope.extending(*Array.wrap(@reflection.options[:extend])) - end + scope = scope.extending(*Array.wrap(@reflection.options[:extend])) scope.where(construct_owner_conditions) end -- cgit v1.2.3