Permalink
Browse files

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
  • Loading branch information...
1 parent d5ec8ef commit 5a7e6b68dbb75290d276479dc85148a8a7214c78 Neeraj Singh committed Feb 24, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations.rb
@@ -965,8 +965,8 @@ def association_instance_set(name, association)
# 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

0 comments on commit 5a7e6b6

Please sign in to comment.