Permalink
Browse files

Move middlewares to the Application level. If you want to modify the …

…middleware, either use Rails.application.config.middleware or modify it in an initializer (if you need to set it relative to user-specified middleware).
  • Loading branch information...
1 parent 79b0b50 commit ae93789d9ad9095ca21784287464b760db12a095 Carlhuda committed Mar 8, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −0 railties/lib/rails/application/configuration.rb
  2. +0 −4 railties/lib/rails/railtie/configuration.rb
@@ -21,6 +21,10 @@ def initialize(*)
@consider_all_requests_local = true
end
+ def middleware
+ @@default_middleware_stack ||= default_middleware
+ end
+
def paths
@paths ||= begin
paths = super
@@ -10,10 +10,6 @@ def initialize
@session_options = {}
end
- def middleware
- @@default_middleware_stack ||= default_middleware
- end
-
# Holds generators configuration:
#
# config.generators do |g|

0 comments on commit ae93789

Please sign in to comment.