From 145f182ea192722ad20b76c9230150614f105431 Mon Sep 17 00:00:00 2001 From: Mike Enriquez Date: Sun, 31 May 2009 11:16:28 -0400 Subject: [PATCH] Fix url and route helpers to follow the given example --- railties/guides/source/routing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 41ca4ecb0c..1873c428bf 100644 --- a/railties/guides/source/routing.textile +++ b/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 } -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:
+map.resources :photos, :new => { :new => :any }+
This will allow the new action to be invoked by any request to +photos/new+, no matter what HTTP verb you use.