From cd87cf771acb90c43cd56e5f038fc345a69790f9 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Thu, 5 Aug 2010 11:54:46 -0400 Subject: correcting the documentation that default to false. it does not default to false. returing either false or nil will not halt the chain unless :terminator is explicitly mentioned --- activesupport/lib/active_support/callbacks.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'activesupport/lib/active_support/callbacks.rb') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 4950d009d1..e179287b24 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -522,14 +522,13 @@ module ActiveSupport # # This macro accepts the following options: # - # * :terminator - Indicates when a before filter is considered - # to be halted. + # * :terminator - Indicates when a before filter is considered to be halted. # # define_callbacks :validate, :terminator => "result == false" # - # In the example above, if any before validate callbacks returns +false+, - # other callbacks are not executed. Defaults to "false", meaning no value - # halts the chain. + # In the example above, if any before validate callback returns +false+, + # other callbacks are not executed. Note that in this case if the callback + # returns +nil+ then other callbacks are still executed. # # * :rescuable - By default, after filters are not executed if # the given block or a before filter raises an error. Set this option to -- cgit v1.2.3