diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-02-24 12:50:45 -0500 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-02-24 12:50:45 -0500 |
commit | 5a7e6b68dbb75290d276479dc85148a8a7214c78 (patch) | |
tree | e71c650d38c17912dd3a5a6296eb7365195f4a8f /activerecord | |
parent | d5ec8efdafaf24661b7d40478ca91dfda9464f93 (diff) | |
download | rails-5a7e6b68dbb75290d276479dc85148a8a7214c78.tar.gz rails-5a7e6b68dbb75290d276479dc85148a8a7214c78.tar.bz2 rails-5a7e6b68dbb75290d276479dc85148a8a7214c78.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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+, <tt>delete</tt> and <tt>destroy</tt> are the same: they # cause the records in the join table to be removed. # - # For +has_many+, <tt>destroy</tt> will always call the <tt>destroy</tt> method of the - # record(s) being removed so that callbacks are run. However <tt>delete</tt> will either + # For +has_many+, <tt>destroy</tt> and <tt>destory_all</tt> will always call the <tt>destroy</tt> method of the + # record(s) being removed so that callbacks are run. However <tt>delete</tt> and <tt>delete_all</tt> will either # do the deletion according to the strategy specified by the <tt>:dependent</tt> option, or # if no <tt>:dependent</tt> option is given, then it will follow the default strategy. # The default strategy is <tt>:nullify</tt> (set the foreign keys to <tt>nil</tt>), except for |