aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/collection_association.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2014-05-12 14:11:15 -0400
committereileencodes <eileencodes@gmail.com>2014-05-13 20:56:34 -0400
commit05a90c36c55fe0e43d60c2d0aa09d7a16ddd34ee (patch)
tree7cede88865079ee2849f7cdfe0889dec8f7a9348 /activerecord/lib/active_record/associations/collection_association.rb
parent1c851b8cdfba73066b4d6c045d9d228647635f98 (diff)
downloadrails-05a90c36c55fe0e43d60c2d0aa09d7a16ddd34ee.tar.gz
rails-05a90c36c55fe0e43d60c2d0aa09d7a16ddd34ee.tar.bz2
rails-05a90c36c55fe0e43d60c2d0aa09d7a16ddd34ee.zip
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.
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb2
1 files changed, 1 insertions, 1 deletions
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