diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-03-20 14:03:43 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-20 14:03:43 -0500 |
commit | fcc6b12e77e2304a5b6be5c972749e2360dba62a (patch) | |
tree | 2c25bb71ad7f143d9c764e71b6c6e11161def43b | |
parent | 14b7452c578b8a1594daa8ae87fa26530601669c (diff) | |
download | rails-fcc6b12e77e2304a5b6be5c972749e2360dba62a.tar.gz rails-fcc6b12e77e2304a5b6be5c972749e2360dba62a.tar.bz2 rails-fcc6b12e77e2304a5b6be5c972749e2360dba62a.zip |
Autoload Rails::Info
-rw-r--r-- | railties/lib/rails.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/info_controller.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/info_routes.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/misc.rake | 1 | ||||
-rw-r--r-- | railties/test/rails_info_controller_test.rb | 3 |
5 files changed, 3 insertions, 8 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 3d3151bd8f..9d02da104d 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -26,6 +26,9 @@ else end module Rails + autoload :Info, 'rails/info' + autoload :InfoController, 'rails/info_controller' + class << self def application @@application ||= nil diff --git a/railties/lib/rails/info_controller.rb b/railties/lib/rails/info_controller.rb index 18f13dc095..196eeb4a6c 100644 --- a/railties/lib/rails/info_controller.rb +++ b/railties/lib/rails/info_controller.rb @@ -1,5 +1,3 @@ -require 'rails/info' - class Rails::InfoController < ActionController::Base def properties if consider_all_requests_local? || local_request? diff --git a/railties/lib/rails/info_routes.rb b/railties/lib/rails/info_routes.rb index 2e4157ea8d..bd58034d8f 100644 --- a/railties/lib/rails/info_routes.rb +++ b/railties/lib/rails/info_routes.rb @@ -1,5 +1,3 @@ -require 'rails/info_controller' - Rails.application.routes.draw do |map| match '/rails/info/properties' => "rails/info#properties" end diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index 2309c91d83..0926707a04 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -15,7 +15,6 @@ end desc 'Explain the current environment' task :about do - require 'rails/info' puts Rails::Info end diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index d904d7b461..05ec359f61 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -1,9 +1,6 @@ require 'abstract_unit' require 'action_controller' -require 'rails/info' -require 'rails/info_controller' - module ActionController class Base include ActionController::Testing |