From 69c049f5ab45bf9bfb0d269acea0773581905fd4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 20 Feb 2009 12:04:57 -0600 Subject: Move development mode reloading up the stack to avoid issues with class reloading in middleware --- railties/lib/console_app.rb | 3 +-- railties/lib/initializer.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/lib/console_app.rb b/railties/lib/console_app.rb index a35c96c957..d7cd57564f 100644 --- a/railties/lib/console_app.rb +++ b/railties/lib/console_app.rb @@ -24,7 +24,6 @@ end #reloads the environment def reload! puts "Reloading..." - dispatcher = ActionController::Dispatcher.new($stdout) - dispatcher.reload_application + Dispatcher.reload_application true end diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 281b074e0a..7e1bd23a55 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -583,7 +583,7 @@ Run `rake gems:install` to install the missing gems. return unless configuration.frameworks.include?(:action_controller) require 'dispatcher' unless defined?(::Dispatcher) Dispatcher.define_dispatcher_callbacks(configuration.cache_classes) - Dispatcher.new(Rails.logger).send :run_callbacks, :prepare_dispatch + Dispatcher.run_prepare_callbacks end def disable_dependency_loading -- cgit v1.2.3