diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-07-15 14:26:09 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-07-15 14:26:09 -0300 |
commit | 64c1264419f766a306eba0418c1030b87489ea67 (patch) | |
tree | 1aee52a2e2434d2e7eecc67f94683e99823e79d0 /activerecord/lib/active_record/associations | |
parent | a0b4dc21a2188a4379bc401b73336608fec56c64 (diff) | |
parent | beb07fbfae845d20323a9863c7216c6b63aff9c7 (diff) | |
download | rails-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.rb | 2 |
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 |