diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-08 11:39:33 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-08 11:40:51 -0800 |
commit | ae93789d9ad9095ca21784287464b760db12a095 (patch) | |
tree | 8872090a13433a4b9d4878bb30a5a1df825eefba | |
parent | 79b0b5082c74b008c73dabcd3216fdc5bac8e6ee (diff) | |
download | rails-ae93789d9ad9095ca21784287464b760db12a095.tar.gz rails-ae93789d9ad9095ca21784287464b760db12a095.tar.bz2 rails-ae93789d9ad9095ca21784287464b760db12a095.zip |
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).
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/railtie/configuration.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index a00f9c43ae..d3a0ecb243 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -21,6 +21,10 @@ module Rails @consider_all_requests_local = true end + def middleware + @@default_middleware_stack ||= default_middleware + end + def paths @paths ||= begin paths = super diff --git a/railties/lib/rails/railtie/configuration.rb b/railties/lib/rails/railtie/configuration.rb index 6a8c4ca09f..828ccec3d0 100644 --- a/railties/lib/rails/railtie/configuration.rb +++ b/railties/lib/rails/railtie/configuration.rb @@ -10,10 +10,6 @@ module Rails @session_options = {} end - def middleware - @@default_middleware_stack ||= default_middleware - end - # Holds generators configuration: # # config.generators do |g| |