Permalink
Browse files

Improve documentation about :dependent and callbacks.

Fixes #3458.
  • Loading branch information...
1 parent 00fef0a commit ecaf728774aa5f4232cc17532272408f9a9819b7 @steveklabnik steveklabnik committed Sep 15, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/lib/active_record/associations.rb
@@ -949,6 +949,11 @@ def association_instance_set(name, association)
# is done. For more information, see the documentation for this option on the different
# specific association types. When no option is given, the behaviour is to do nothing
# with the associated records when destroying a record.
+ #
+ # Note that <tt>:dependent</tt> is implemented using Rails' callback
+ # system, which works by processing callbacks in order. Therefore, other
+ # callbacks declared either before or after the <tt>:depenent</tt> option
+ # can affect what it does.
#
# === Delete or destroy?
#

0 comments on commit ecaf728

Please sign in to comment.