From adbe7daab6623baf97a842f73fe310c850552fdd Mon Sep 17 00:00:00 2001 From: Wen-Tien Chang Date: Thu, 16 Jun 2011 13:29:17 +0800 Subject: [PATCH 1/2] Improve the legacy wild controller route in app templates --- .../lib/rails/generators/rails/app/templates/config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/app/templates/config/routes.rb b/railties/lib/rails/generators/rails/app/templates/config/routes.rb index d50f536164..ea81748464 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/routes.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/routes.rb @@ -54,5 +54,5 @@ # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' + # match ':controller(/:action(/:id))(.:format)' end From d7aac1f1e4f4c6b9d8b98ce02dc1d62cc6ccfa0b Mon Sep 17 00:00:00 2001 From: Wen-Tien Chang Date: Thu, 16 Jun 2011 14:03:41 +0800 Subject: [PATCH 2/2] Also change the default route comment --- actionpack/lib/action_dispatch/routing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 74c090f260..1dcd83ceb5 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -161,7 +161,7 @@ module ActionDispatch # Consider the following route, which you will find commented out at the # bottom of your generated config/routes.rb: # - # match ':controller(/:action(/:id(.:format)))' + # match ':controller(/:action(/:id))(.:format)' # # This route states that it expects requests to consist of a # :controller followed optionally by an :action that in