Permalink
Browse files

Fix url and route helpers to follow the given example

  • Loading branch information...
1 parent 0351896 commit 145f182ea192722ad20b76c9230150614f105431 @enriquez enriquez committed May 31, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/routing.textile
@@ -614,7 +614,7 @@ To add a new route (one that creates a new resource), use the +:new+ option:
map.resources :photos, :new => { :upload => :post }
</ruby>
-This will enable Rails to recognize URLs such as +/photos/upload+ using the POST HTTP verb, and route them to the upload action of the Photos controller. It will also create the +upload_photos_path+ and +upload_photos_url+ route helpers.
+This will enable Rails to recognize URLs such as +/photos/new/upload+ using the POST HTTP verb, and route them to the upload action of the Photos controller. It will also create the +upload_new_photos_path+ and +upload_new_photos_url+ route helpers.
TIP: If you want to redefine the verbs accepted by one of the standard actions, you can do so by explicitly mapping that action. For example:<br/>+map.resources :photos, :new => { :new => :any }+<br/>This will allow the new action to be invoked by any request to +photos/new+, no matter what HTTP verb you use.

0 comments on commit 145f182

Please sign in to comment.