diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-23 17:14:21 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-23 17:14:21 -0800 |
commit | 1ee50e58f6eb429872dfeabeb0708a8065ff34de (patch) | |
tree | 52604a3a9d91f9508a3c49390246ade12a21e48f | |
parent | 94bb3316353ace661a83563f44a9c47baf438f26 (diff) | |
download | rails-1ee50e58f6eb429872dfeabeb0708a8065ff34de.tar.gz rails-1ee50e58f6eb429872dfeabeb0708a8065ff34de.tar.bz2 rails-1ee50e58f6eb429872dfeabeb0708a8065ff34de.zip |
Fix Rack::Lock middleware condition: use *unless* we allow concurrency
-rw-r--r-- | railties/lib/rails/application.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index c594b8a31d..e950d72586 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -176,7 +176,7 @@ module Rails initializer :initialize_middleware_stack do if config.frameworks.include?(:action_controller) - config.middleware.use(::Rack::Lock, :if => lambda { ActionController::Base.allow_concurrency }) + config.middleware.use(::Rack::Lock, :if => lambda { !ActionController::Base.allow_concurrency }) config.middleware.use(::Rack::Runtime) config.middleware.use(ActionDispatch::ShowExceptions, lambda { ActionController::Base.consider_all_requests_local }) config.middleware.use(ActionDispatch::Callbacks, lambda { ActionController::Dispatcher.prepare_each_request }) |