diff options
author | Hendy Tanata <htanata@gmail.com> | 2011-07-15 01:54:59 +0800 |
---|---|---|
committer | Hendy Tanata <htanata@gmail.com> | 2011-07-16 04:23:05 +0800 |
commit | 193e4de20646a025bf6dd3f90d1f9a53edb1cecf (patch) | |
tree | 8edc77c9475262ef0308de17d01c21b119cab707 /railties/guides/source/routing.textile | |
parent | f88e9d83f13c7d29120696d7e568fae1efea67f4 (diff) | |
download | rails-193e4de20646a025bf6dd3f90d1f9a53edb1cecf.tar.gz rails-193e4de20646a025bf6dd3f90d1f9a53edb1cecf.tar.bz2 rails-193e4de20646a025bf6dd3f90d1f9a53edb1cecf.zip |
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}/}
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r-- | railties/guides/source/routing.textile | 8 |
1 files changed, 4 insertions, 4 deletions
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: <pre> - 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 </pre> You may restrict the listing to the routes that map to a particular controller setting the +CONTROLLER+ environment variable: |