Permalink
Browse files

Move reloader middleware in ActionDispatch

  • Loading branch information...
josh committed Apr 14, 2009
1 parent 1d26865 commit d7396b5ca9c066cb16158c02b976dab01f522344
@@ -57,7 +57,6 @@ def self.load_all!
autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
autoload :RecordIdentifier, 'action_controller/record_identifier'
autoload :Redirector, 'action_controller/base/redirect'
- autoload :Reloader, 'action_controller/reloader'
autoload :Renderer, 'action_controller/base/render'
autoload :RequestForgeryProtection, 'action_controller/base/request_forgery_protection'
autoload :Rescue, 'action_controller/dispatch/rescue'
@@ -5,8 +5,8 @@ class Dispatcher
class << self
def define_dispatcher_callbacks(cache_classes)
unless cache_classes
- unless self.middleware.include?(Reloader)
- self.middleware.insert_after(ActionDispatch::Failsafe, Reloader)
+ unless self.middleware.include?(ActionDispatch::Reloader)
+ self.middleware.insert_after(ActionDispatch::Failsafe, ActionDispatch::Reloader)
end
ActionView::Helpers::AssetTagHelper.cache_asset_timestamps = false
@@ -46,6 +46,7 @@ module ActionDispatch
autoload :Failsafe, 'action_dispatch/middleware/failsafe'
autoload :ParamsParser, 'action_dispatch/middleware/params_parser'
+ autoload :Reloader, 'action_dispatch/middleware/reloader'
autoload :RewindableInput, 'action_dispatch/middleware/rewindable_input'
autoload :MiddlewareStack, 'action_dispatch/middleware/stack'
@@ -1,14 +1,14 @@
-module ActionController
+module ActionDispatch
class Reloader
def initialize(app)
@app = app
end
def call(env)
- Dispatcher.reload_application
+ ActionController::Dispatcher.reload_application
@app.call(env)
ensure
- Dispatcher.cleanup_application
+ ActionController::Dispatcher.cleanup_application
end
end
end

0 comments on commit d7396b5

Please sign in to comment.