From 05a90c36c55fe0e43d60c2d0aa09d7a16ddd34ee Mon Sep 17 00:00:00 2001 From: eileencodes Date: Mon, 12 May 2014 14:11:15 -0400 Subject: rename delete_all_records to delete_or_nullify_all_records Rename delete_all_records because this name better describes what the method is doing. We can then remove :all from the hm:t version and pull out the unoptimized call to load_target in delete_records and pass it directly. --- activerecord/lib/active_record/associations/collection_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/collection_association.rb') diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index d83019a920..caf4e612f9 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -194,7 +194,7 @@ module ActiveRecord options[:dependent] end - delete_all_records(dependent).tap do + delete_or_nullify_all_records(dependent).tap do reset loaded! end -- cgit v1.2.3