From 5a7e6b68dbb75290d276479dc85148a8a7214c78 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Sun, 24 Feb 2013 12:50:45 -0500 Subject: Updated doc to clarify about update_all and delete_all delete_all will call callbacks if depdent option is specified as :destroy. This behavior is not very clear from the documetation and hence issue #7832 was raised. closes #7832 --- activerecord/lib/active_record/associations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 06bdabfced..513d1012ba 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -965,8 +965,8 @@ module ActiveRecord # For +has_and_belongs_to_many+, delete and destroy are the same: they # cause the records in the join table to be removed. # - # For +has_many+, destroy will always call the destroy method of the - # record(s) being removed so that callbacks are run. However delete will either + # For +has_many+, destroy and destory_all will always call the destroy method of the + # record(s) being removed so that callbacks are run. However delete and delete_all will either # do the deletion according to the strategy specified by the :dependent option, or # if no :dependent option is given, then it will follow the default strategy. # The default strategy is :nullify (set the foreign keys to nil), except for -- cgit v1.2.3