From 76d2c455c0607b4cd5f238cadef8f933a18567fb Mon Sep 17 00:00:00 2001 From: chrisfinne Date: Sat, 9 Jan 2010 05:36:59 -0800 Subject: Add debugging documentation for _callback_chain to ActiveRecord::Callback Signed-off-by: Rizwan Reza --- activerecord/lib/active_record/callbacks.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 1128286f2b..add5d99ca6 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -205,6 +205,16 @@ module ActiveRecord # including after_* hooks. Note, however, that in that case the client # needs to be aware of it because an ordinary +save+ will raise such exception # instead of quietly returning +false+. + # + # == Debugging callbacks + # + # To list the methods and procs registered with a particular callback, append _callback_chain to the callback name that you wish to list and send that to your class from the Rails console: + # + # >> Topic.after_save_callback_chain + # => [#, kind:after_save, identifiernil, + # options{}] + # module Callbacks extend ActiveSupport::Concern -- cgit v1.2.3