aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-07-15 14:26:09 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-07-15 14:26:09 -0300
commit64c1264419f766a306eba0418c1030b87489ea67 (patch)
tree1aee52a2e2434d2e7eecc67f94683e99823e79d0 /activerecord/lib/active_record/associations
parenta0b4dc21a2188a4379bc401b73336608fec56c64 (diff)
parentbeb07fbfae845d20323a9863c7216c6b63aff9c7 (diff)
downloadrails-64c1264419f766a306eba0418c1030b87489ea67.tar.gz
rails-64c1264419f766a306eba0418c1030b87489ea67.tar.bz2
rails-64c1264419f766a306eba0418c1030b87489ea67.zip
Merge pull request #20887 from tgxworld/ar_callbacks
Revert "Revert "Reduce allocations when running AR callbacks.""
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb
index cd79266952..1aa6a2ca74 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -133,7 +133,7 @@ module ActiveRecord
if scope.klass.primary_key
count = scope.destroy_all.length
else
- scope.each { |record| record.run_callbacks :destroy }
+ scope.each(&:_run_destroy_callbacks)
arel = scope.arel