diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2011-01-09 10:15:05 -0800 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-01-31 19:45:53 -0200 |
commit | 57bc25c5f8129f57b08a2dc7c319b86778dd8a40 (patch) | |
tree | 4e21728c5dd1866f654ed88d169552a77fa6483b /actionpack/lib | |
parent | 9666b6a625c9fef555c2a18df6721fed2000f131 (diff) | |
download | rails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.tar.gz rails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.tar.bz2 rails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.zip |
Use run_callbacks; the generated _run_<name>_callbacks method is not a public interface.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/callbacks.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/reloader.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb index 4d038c29f2..1bb2ad7f67 100644 --- a/actionpack/lib/action_dispatch/middleware/callbacks.rb +++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb @@ -25,7 +25,7 @@ module ActionDispatch end def call(env) - _run_call_callbacks do + run_callbacks :call do @app.call(env) end end diff --git a/actionpack/lib/action_dispatch/middleware/reloader.rb b/actionpack/lib/action_dispatch/middleware/reloader.rb index f6ab368ad8..29289a76b4 100644 --- a/actionpack/lib/action_dispatch/middleware/reloader.rb +++ b/actionpack/lib/action_dispatch/middleware/reloader.rb @@ -43,12 +43,12 @@ module ActionDispatch # Execute all prepare callbacks. def self.prepare! - new(nil).send(:_run_prepare_callbacks) + new(nil).run_callbacks :prepare end # Execute all cleanup callbacks. def self.cleanup! - new(nil).send(:_run_cleanup_callbacks) + new(nil).run_callbacks :cleanup end def initialize(app) @@ -64,12 +64,12 @@ module ActionDispatch end def call(env) - _run_prepare_callbacks + run_callbacks :prepare response = @app.call(env) response[2].extend(CleanupOnClose) response rescue Exception - _run_cleanup_callbacks + run_callbacks :cleanup raise end end |