Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Give the builtin controllers their own routes.rb now that the legacy …

…catch-all is gone
  • Loading branch information...
commit 36624b2c709925bcabb49d12082b9dd9d28c4c5c 1 parent fee07b9
@dhh dhh authored
View
3  railties/builtin/routes.rb
@@ -0,0 +1,3 @@
+ActionController::Routing::Routes.draw do |map|
+ match '/rails/info/properties' => "rails::info#properties"
+end
View
1  railties/lib/rails/application.rb
@@ -418,6 +418,7 @@ def call(env)
initializer :initialize_routing do
next unless configuration.frameworks.include?(:action_controller)
route_configuration_files << configuration.routes_configuration_file
+ route_configuration_files << configuration.builtin_routes_configuration_file
reload_routes!
end
#
View
4 railties/lib/rails/configuration.rb
@@ -158,6 +158,10 @@ def routes_configuration_file
@routes_configuration_file ||= File.join(root, 'config', 'routes.rb')
end
+ def builtin_routes_configuration_file
+ @builtin_routes_configuration_file ||= File.join(RAILTIES_PATH, 'builtin', 'routes.rb')
+ end
+
def controller_paths
@controller_paths ||= begin
paths = [File.join(root, 'app', 'controllers')]
Please sign in to comment.
Something went wrong with that request. Please try again.