From 889e8bee82ea4f75adb6de5badad512d2c615b7f Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 14 Dec 2011 19:20:19 +0000 Subject: Fix #3672 again (dependent: delete_all perf) --- .../active_record/associations/has_and_belongs_to_many_association.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb') diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb index 1f917f58f2..a4cea99372 100644 --- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb @@ -32,6 +32,10 @@ module ActiveRecord record end + # ActiveRecord::Relation#delete_all needs to support joins before we can use a + # SQL-only implementation. + alias delete_all_on_destroy delete_all + private def count_records -- cgit v1.2.3