aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_proxy.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-02-01 17:20:24 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2011-02-01 17:20:24 -0200
commit451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e (patch)
tree3d39c34e3606898fd834964fcfae4c045ab307d3 /activerecord/lib/active_record/associations/association_proxy.rb
parentc2aca3ddd78b514d099ddef5afc4cee0dd7d75f2 (diff)
downloadrails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.tar.gz
rails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.tar.bz2
rails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.zip
scope is always a Relation
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb4
1 files changed, 1 insertions, 3 deletions
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