aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-17 11:44:04 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-17 11:44:04 +0100
commit61ada28ed3cdc42efa6f9714e909231959b88c26 (patch)
tree82737429b7d02952a6aa79cbf296e3759392a408
parent8f5e733998c2f06b63e72072c152546f2074c08e (diff)
downloadrails-61ada28ed3cdc42efa6f9714e909231959b88c26.tar.gz
rails-61ada28ed3cdc42efa6f9714e909231959b88c26.tar.bz2
rails-61ada28ed3cdc42efa6f9714e909231959b88c26.zip
Get rid of prepare_each_request, since now it's a middleware initialization parameter.
-rw-r--r--actionpack/lib/action_controller/deprecated/dispatcher.rb3
-rw-r--r--actionpack/lib/action_controller/railtie.rb1
-rw-r--r--railties/lib/rails/configuration.rb2
3 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/deprecated/dispatcher.rb b/actionpack/lib/action_controller/deprecated/dispatcher.rb
index 3da3c8ce7d..1a70d2ee4d 100644
--- a/actionpack/lib/action_controller/deprecated/dispatcher.rb
+++ b/actionpack/lib/action_controller/deprecated/dispatcher.rb
@@ -1,8 +1,5 @@
module ActionController
class Dispatcher
- cattr_accessor :prepare_each_request
- self.prepare_each_request = false
-
class << self
def before_dispatch(*args, &block)
ActiveSupport::Deprecation.warn "ActionController::Dispatcher.before_dispatch is deprecated. " <<
diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb
index f070b13dbf..d93155e7a5 100644
--- a/actionpack/lib/action_controller/railtie.rb
+++ b/actionpack/lib/action_controller/railtie.rb
@@ -73,7 +73,6 @@ module ActionController
# TODO: This used to say unless defined?(Dispatcher). Find out why and fix.
# Notice that at this point, ActionDispatch::Callbacks were already loaded.
require 'rails/dispatcher'
- ActionController::Dispatcher.prepare_each_request = true unless app.config.cache_classes
unless app.config.cache_classes
# Setup dev mode route reloading
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb
index 72bebe085d..c3e1120fa3 100644
--- a/railties/lib/rails/configuration.rb
+++ b/railties/lib/rails/configuration.rb
@@ -15,7 +15,7 @@ module Rails
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::Callbacks', lambda { !Rails.application.config.cache_classes })
middleware.use('ActionDispatch::Cookies')
middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options })
middleware.use('ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store })