diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-12 21:58:49 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-12 21:58:49 -0500 |
commit | 9bc8defe38253840ceb9c4ad92e7c3abc0066ed8 (patch) | |
tree | 099c5629c74466fd76a4947a34c375ec005ef2a3 /actionpack | |
parent | 2a5c92c1017a805fbc8dad3f5fbf5e9fe7dda2c4 (diff) | |
download | rails-9bc8defe38253840ceb9c4ad92e7c3abc0066ed8.tar.gz rails-9bc8defe38253840ceb9c4ad92e7c3abc0066ed8.tar.bz2 rails-9bc8defe38253840ceb9c4ad92e7c3abc0066ed8.zip |
Use "run_callbacks :foo" since it is the public api for callbacks [#3329
state:resolved]
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/callbacks.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 379eaf6d8e..7f12561da5 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -16,7 +16,7 @@ module AbstractController # Override AbstractController::Base's process_action to run the # process_action callbacks around the normal behavior. def process_action(method_name) - _run_process_action_callbacks(method_name) do + run_callbacks(:process_action, method_name) do super end end diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb index 56d6da1706..e1764b064c 100644 --- a/actionpack/lib/action_dispatch/middleware/callbacks.rb +++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb @@ -37,12 +37,12 @@ module ActionDispatch def initialize(app, prepare_each_request = false) @app, @prepare_each_request = app, prepare_each_request - _run_prepare_callbacks + run_callbacks(:prepare) end def call(env) - _run_call_callbacks do - _run_prepare_callbacks if @prepare_each_request + run_callbacks(:call) do + run_callbacks(:prepare) if @prepare_each_request @app.call(env) end end |