Permalink
Browse files

Update Rails' built in routes to use RouteSet#append

  • Loading branch information...
1 parent 7418a44 commit 117daba18a269988292ce3872683fba0517d31df @carllerche carllerche committed Sep 17, 2010
@@ -59,7 +59,6 @@ def encoding=(value)
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 @@ def cache_store
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
@@ -27,7 +27,9 @@ module Finisher
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
@@ -1,3 +0,0 @@
-Rails.application.routes.draw do
- match '/rails/info/properties' => "rails/info#properties"
-end

0 comments on commit 117daba

Please sign in to comment.