diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/dispatcher.rb | 3 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index 6bc61889d1..98ae774cea 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -50,7 +50,6 @@ class Dispatcher # mailers, and so forth. This allows them to be loaded again without having # to restart the server (WEBrick, FastCGI, etc.). def reset_application! - Controllers.clear! Dependencies.clear ActiveRecord::Base.reset_subclasses Class.remove_class(*Reloadable.reloadable_classes) @@ -67,7 +66,7 @@ class Dispatcher def prepare_application ActionController::Routing::Routes.reload if Dependencies.load? prepare_breakpoint - Controllers.const_load!(:ApplicationController, "application") unless Controllers.const_defined?(:ApplicationController) + require_dependency('application.rb') unless Object.const_defined?(:ApplicationController) end def reset_after_dispatch diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 68b14b9fe0..e1b058f3b9 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -225,7 +225,6 @@ module Rails def initialize_routing return unless configuration.frameworks.include?(:action_controller) ActionController::Routing::Routes.reload - Object.const_set "Controllers", Dependencies::LoadingModule.root(*configuration.controller_paths) end # Sets the dependency loading mechanism based on the value of @@ -457,6 +456,9 @@ module Rails def default_load_paths paths = ["#{root_path}/test/mocks/#{environment}"] + + # Add the app's controller directory + paths.concat(Dir["#{root_path}/app/controllers/"]) # Then model subdirectories. # TODO: Don't include .rb models as load paths |