diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-01 17:20:24 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-01 17:20:24 -0200 |
commit | 451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e (patch) | |
tree | 3d39c34e3606898fd834964fcfae4c045ab307d3 /activerecord | |
parent | c2aca3ddd78b514d099ddef5afc4cee0dd7d75f2 (diff) | |
download | rails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.tar.gz rails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.tar.bz2 rails-451ad38bb2eafbaff48697f6d38f27cbc9cc6e9e.zip |
scope is always a Relation
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 4 |
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 |