aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_many_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/has_many_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/has_many_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_many_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb
index 8da543f3ff..4a7d8ed74a 100644
--- a/activerecord/lib/active_record/associations/has_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_association.rb
@@ -113,7 +113,7 @@ module ActiveRecord
end
end
- def delete_all_records(method)
+ def delete_or_nullify_all_records(method)
count = delete_count(method, self.scope)
update_counter(-count)
end