From 860d7c566bd3041069c5763559341a1b6a2a1305 Mon Sep 17 00:00:00 2001 From: Marcelo Giorgi Date: Sun, 3 Oct 2010 20:54:08 -0200 Subject: Correct documentation that references how *_filter of action_pack are translated into set_callback/run_callback's (from active_support) invocations. --- activesupport/lib/active_support/callbacks.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 0c1d46c7ec..8f8def5922 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -459,12 +459,12 @@ module ActiveSupport # # becomes # - # dispatch_callback :before, :authenticate, :per_key => {:unless => proc {|c| c.action_name == "index"}} + # set_callback :process_action, :before, :authenticate, :per_key => {:unless => proc {|c| c.action_name == "index"}} # # Per-Key conditions are evaluated only once per use of a given key. # In the case of the above example, you would do: # - # run_callbacks(:dispatch, action_name) { ... dispatch stuff ... } + # run_callbacks(:process_action, action_name) { ... dispatch stuff ... } # # In that case, each action_name would get its own compiled callback # method that took into consideration the per_key conditions. This -- cgit v1.2.3