From 193e4de20646a025bf6dd3f90d1f9a53edb1cecf Mon Sep 17 00:00:00 2001 From: Hendy Tanata Date: Fri, 15 Jul 2011 01:54:59 +0800 Subject: Better formatting of route requirements in rake:routes. Previously it was: {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} Now it becomes: photos#show {:id=>/[A-Z]\d{5}/} --- railties/guides/source/routing.textile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 1cbc5c8f6e..6a729d9641 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -823,10 +823,10 @@ If you want a complete list of all of the available routes in your application, For example, here's a small section of the +rake routes+ output for a RESTful route:
-          users GET  /users          {:controller=>"users", :action=>"index"}
-formatted_users GET  /users.:format  {:controller=>"users", :action=>"index"}
-                POST /users          {:controller=>"users", :action=>"create"}
-                POST /users.:format  {:controller=>"users", :action=>"create"}
+    users GET    /users(.:format)          users#index
+          POST   /users(.:format)          users#create
+ new_user GET    /users/new(.:format)      users#new
+edit_user GET    /users/:id/edit(.:format) users#edit
 
You may restrict the listing to the routes that map to a particular controller setting the +CONTROLLER+ environment variable: -- cgit v1.2.3