diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-16 16:12:04 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-16 16:12:04 -0600 |
commit | b9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384 (patch) | |
tree | 99a046ccbc8e4054b0be0e0928dba0c49d4cb5b8 /railties/lib | |
parent | 7217d64f615ec064f15c9b2999e98e54997fe67c (diff) | |
download | rails-b9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384.tar.gz rails-b9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384.tar.bz2 rails-b9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384.zip |
Need to lazy realize middleware options so they can be modified in
the environment
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 9e57354047..e65c20de2c 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -210,9 +210,9 @@ module Rails initializer :initialize_middleware_stack do if config.frameworks.include?(:action_controller) - config.middleware.use(::Rack::Lock) unless ActionController::Base.allow_concurrency - config.middleware.use(ActionDispatch::ShowExceptions, ActionController::Base.consider_all_requests_local) - config.middleware.use(ActionDispatch::Callbacks, ActionController::Dispatcher.prepare_each_request) + config.middleware.use(::Rack::Lock, :if => lambda { ActionController::Base.allow_concurrency }) + config.middleware.use(ActionDispatch::ShowExceptions, lambda { ActionController::Base.consider_all_requests_local }) + config.middleware.use(ActionDispatch::Callbacks, lambda { ActionController::Dispatcher.prepare_each_request }) config.middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) config.middleware.use(ActionDispatch::ParamsParser) config.middleware.use(::Rack::MethodOverride) |