aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_many_through_association.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-06-07 20:02:49 +0100
committerJon Leighton <j@jonathanleighton.com>2012-06-07 20:02:49 +0100
commit959fb8ea651fa6638aaa7caced20d921ca2ea5c1 (patch)
treea9d1cea0486d309cf57f7c716f35e98d83a5f6c5 /activerecord/lib/active_record/associations/has_many_through_association.rb
parent6b6c1de9f96d27af73371b1595c4b9ff76bb59bc (diff)
downloadrails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.tar.gz
rails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.tar.bz2
rails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.zip
Revert "Perf: Don't load the association for #delete_all."
This reverts commit b98d1e21635d8776de8893cc09bd86c71f6c78f0. Closes #6609 Conflicts: activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb4
1 files changed, 0 insertions, 4 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 86c665b5fe..53d49fef2e 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -126,10 +126,6 @@ module ActiveRecord
def delete_records(records, method)
ensure_not_nested
- # This is unoptimised; it will load all the target records
- # even when we just want to delete everything.
- records = load_target if records == :all
-
scope = through_association.scoped.where(construct_join_attributes(*records))
case method