diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-26 21:59:28 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-26 21:59:28 -0500 |
commit | a6757a02e12aa584bd74dbcde18a7886be8e9029 (patch) | |
tree | 74d3ca8fe45d1bc031371e7735241fa265e42c67 /actionpack/lib/action_controller/dispatch | |
parent | 14866fa3d83676d340d94464f50e2e0ea989c3c1 (diff) | |
download | rails-a6757a02e12aa584bd74dbcde18a7886be8e9029.tar.gz rails-a6757a02e12aa584bd74dbcde18a7886be8e9029.tar.bz2 rails-a6757a02e12aa584bd74dbcde18a7886be8e9029.zip |
Move middleware and route configuration from AC::Dispatcher to Rails application object
Diffstat (limited to 'actionpack/lib/action_controller/dispatch')
-rw-r--r-- | actionpack/lib/action_controller/dispatch/dispatcher.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/dispatch/dispatcher.rb b/actionpack/lib/action_controller/dispatch/dispatcher.rb index 75b778a676..e04da42637 100644 --- a/actionpack/lib/action_controller/dispatch/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatch/dispatcher.rb @@ -7,12 +7,6 @@ module ActionController cattr_accessor :prepare_each_request self.prepare_each_request = false - cattr_accessor :router - self.router = Routing::Routes - - cattr_accessor :middleware - self.middleware = ActionDispatch::MiddlewareStack.new - class << self def define_dispatcher_callbacks(cache_classes) unless cache_classes @@ -21,7 +15,7 @@ module ActionController # Development mode callbacks ActionDispatch::Callbacks.before_dispatch do |app| - ActionController::Dispatcher.router.reload + ActionController::Routing::Routes.reload end ActionDispatch::Callbacks.after_dispatch do @@ -55,7 +49,8 @@ module ActionController :to => ActionDispatch::Callbacks def new - @@middleware.build(@@router) + # DEPRECATE Rails application fallback + Rails.application end end end |