Permalink
Browse files

Need to lazy realize middleware options so they can be modified in

the environment
  • Loading branch information...
1 parent 7217d64 commit b9d4ceb43c9497fb1c47d8b1e1e6a24a9e157384 @josh josh committed Dec 16, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/application.rb
@@ -210,9 +210,9 @@ def call(env)
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)

0 comments on commit b9d4ceb

Please sign in to comment.