From 9d513e0a19f2b9333cd752b2747db4f350fcddc4 Mon Sep 17 00:00:00 2001 From: Nicholas Firth-McCoy Date: Sat, 18 Jun 2016 18:46:44 +1000 Subject: Fix rails/info routes for apps with globbing route The /rails/info routes were inaccessible in apps with a catch-all globbing route, as they were being appended after the globbing route and would never be matched. See also ccc3ddb7762bae0df7e2f8d643b19b6a4769d5be. --- railties/lib/rails/application/finisher.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 4e24640510..97dde9a3e9 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -21,10 +21,13 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.routes.append do + app.routes.prepend do get '/rails/info/properties' => "rails/info#properties", internal: true get '/rails/info/routes' => "rails/info#routes", internal: true get '/rails/info' => "rails/info#index", internal: true + end + + app.routes.append do get '/' => "rails/welcome#index", internal: true end end -- cgit v1.2.3