diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_proxy.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 3a7a488302..ee8b816ef4 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -37,7 +37,7 @@ module ActiveRecord def initialize(association) #:nodoc: @association = association super association.klass, association.klass.arel_table - merge! association.scoped + merge! association.scope end def target @@ -852,14 +852,14 @@ module ActiveRecord # method, which gets the current scope, which is this object, which # delegates to @association, and so on. def scoping - @association.scoped.scoping { yield } + @association.scope.scoping { yield } end # Returns a <tt>Relation</tt> object for the records in this association def scope association = @association - @association.scoped.extending! do + @association.scope.extending! do define_method(:proxy_association) { association } end end |