From ad9cabd77c26cf58c7179a19caa9efb7e5e0c831 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Fri, 3 Feb 2006 20:29:39 +0000 Subject: Remove LoadingModule git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3526 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/dispatcher.rb | 3 +-- railties/lib/initializer.rb | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'railties') 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 -- cgit v1.2.3