diff options
author | Carl Lerche <me@carllerche.com> | 2010-09-17 12:27:48 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2010-09-17 12:27:48 -0700 |
commit | 117daba18a269988292ce3872683fba0517d31df (patch) | |
tree | e31a212c1f8f7dd789cf162e732b3d7c96738848 /railties | |
parent | 7418a440967586851a182bbcd6d93dbba9497cdb (diff) | |
download | rails-117daba18a269988292ce3872683fba0517d31df.tar.gz rails-117daba18a269988292ce3872683fba0517d31df.tar.bz2 rails-117daba18a269988292ce3872683fba0517d31df.zip |
Update Rails' built in routes to use RouteSet#append
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/info_routes.rb | 3 |
3 files changed, 3 insertions, 9 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index f9f06299a0..a0ecbc0fc8 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -59,7 +59,6 @@ module Rails def paths @paths ||= begin paths = super - paths.app.controllers << builtin_controller if builtin_controller paths.config.database "config/database.yml" paths.config.environment "config/environment.rb" paths.lib.templates "lib/templates" @@ -101,10 +100,6 @@ module Rails end end - def builtin_controller - File.expand_path('../info_routes', __FILE__) if Rails.env.development? - end - def log_level @log_level ||= Rails.env.production? ? :info : :debug end diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 8fd2aa0bce..b95df467c7 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -27,7 +27,9 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.routes_reloader.paths << File.expand_path('../../info_routes.rb', __FILE__) + app.routes.append do + match '/rails/info/properties' => "rails/info#properties" + end end end diff --git a/railties/lib/rails/info_routes.rb b/railties/lib/rails/info_routes.rb deleted file mode 100644 index b5c4e4c1e0..0000000000 --- a/railties/lib/rails/info_routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -Rails.application.routes.draw do - match '/rails/info/properties' => "rails/info#properties" -end |