aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/dispatch/dispatcher.rb5
-rw-r--r--actionpack/lib/action_controller/dispatch/middlewares.rb16
2 files changed, 1 insertions, 20 deletions
diff --git a/actionpack/lib/action_controller/dispatch/dispatcher.rb b/actionpack/lib/action_controller/dispatch/dispatcher.rb
index ba316b9e63..75b778a676 100644
--- a/actionpack/lib/action_controller/dispatch/dispatcher.rb
+++ b/actionpack/lib/action_controller/dispatch/dispatcher.rb
@@ -11,10 +11,7 @@ module ActionController
self.router = Routing::Routes
cattr_accessor :middleware
- self.middleware = ActionDispatch::MiddlewareStack.new do |middleware|
- middlewares = File.join(File.dirname(__FILE__), "middlewares.rb")
- middleware.instance_eval(File.read(middlewares), middlewares, 1)
- end
+ self.middleware = ActionDispatch::MiddlewareStack.new
class << self
def define_dispatcher_callbacks(cache_classes)
diff --git a/actionpack/lib/action_controller/dispatch/middlewares.rb b/actionpack/lib/action_controller/dispatch/middlewares.rb
deleted file mode 100644
index 5641b3cb8d..0000000000
--- a/actionpack/lib/action_controller/dispatch/middlewares.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-use "Rack::Lock", :if => lambda {
- !ActionController::Base.allow_concurrency
-}
-
-use "ActionDispatch::ShowExceptions", lambda { ActionController::Base.consider_all_requests_local }
-use "ActionDispatch::Callbacks", lambda { ActionController::Dispatcher.prepare_each_request }
-
-# TODO: Redirect global exceptions somewhere?
-# use "ActionDispatch::Rescue"
-
-use lambda { ActionController::Base.session_store },
- lambda { ActionController::Base.session_options }
-
-use "ActionDispatch::ParamsParser"
-use "Rack::MethodOverride"
-use "Rack::Head"