diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-17 11:29:41 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-17 11:35:48 +0100 |
commit | 8f5e733998c2f06b63e72072c152546f2074c08e (patch) | |
tree | 46e6497fb3e714e12462012394606ef5c7b24791 /railties/lib | |
parent | 0334f9f6cfa4c4c746de7e19250a13366b616c55 (diff) | |
download | rails-8f5e733998c2f06b63e72072c152546f2074c08e.tar.gz rails-8f5e733998c2f06b63e72072c152546f2074c08e.tar.bz2 rails-8f5e733998c2f06b63e72072c152546f2074c08e.zip |
Add notifications to default middleware stack and update subscriber tests.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/configuration.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/subscriber.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index a597a01d72..72bebe085d 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -14,6 +14,7 @@ module Rails middleware.use('::Rack::Lock', :if => lambda { !ActionController::Base.allow_concurrency }) middleware.use('::Rack::Runtime') middleware.use('ActionDispatch::ShowExceptions', lambda { ActionController::Base.consider_all_requests_local }) + middleware.use('ActionDispatch::Notifications') middleware.use('ActionDispatch::Callbacks', lambda { ActionController::Dispatcher.prepare_each_request }) middleware.use('ActionDispatch::Cookies') middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) diff --git a/railties/lib/rails/subscriber.rb b/railties/lib/rails/subscriber.rb index e8d13babf0..2674bf003e 100644 --- a/railties/lib/rails/subscriber.rb +++ b/railties/lib/rails/subscriber.rb @@ -66,7 +66,7 @@ module Rails subscriber.send(name, ActiveSupport::Notifications::Event.new(*args)) end - if args[0] == "action_dispatch.callback" && !subscribers.empty? + if args[0] == "action_dispatch.after_dispatch" && !subscribers.empty? flush_all! log_tailer.tail! if log_tailer end |