From ecaf728774aa5f4232cc17532272408f9a9819b7 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sat, 15 Sep 2012 12:00:27 +0400 Subject: Improve documentation about :dependent and callbacks. Fixes #3458. --- activerecord/lib/active_record/associations.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d6b8552e6e..203ddd17c7 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -949,6 +949,11 @@ module ActiveRecord # 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 :dependent is implemented using Rails' callback + # system, which works by processing callbacks in order. Therefore, other + # callbacks declared either before or after the :depenent option + # can affect what it does. # # === Delete or destroy? # -- cgit v1.2.3