From 0e14973a3368945d9a7fddb4bfeefe3fc2f2a246 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 24 May 2013 11:20:43 +0200 Subject: It's scoped in 3-2-stable! scope => scoped --- activerecord/lib/active_record/associations/has_many_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index dab57bab88..5296cb7282 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -89,7 +89,7 @@ module ActiveRecord records.each { |r| r.destroy } update_counter(-records.length) unless inverse_updates_counter_cache? else - scope = self.scope.where(reflection.klass.primary_key => records) + scope = self.scoped.where(reflection.klass.primary_key => records) if method == :delete_all update_counter(-scope.delete_all) -- cgit v1.2.3