diff options
author | Mike Enriquez <mike@enriquez.me> | 2009-05-31 11:16:28 -0400 |
---|---|---|
committer | Mike Enriquez <mike@enriquez.me> | 2009-05-31 11:16:28 -0400 |
commit | 145f182ea192722ad20b76c9230150614f105431 (patch) | |
tree | 3fd14dc37d646cd35ca3fbcf1f1926b888dae7e1 /railties/guides/source | |
parent | 0351896f71bb06605eb85060bd5b9f72309569b1 (diff) | |
download | rails-145f182ea192722ad20b76c9230150614f105431.tar.gz rails-145f182ea192722ad20b76c9230150614f105431.tar.bz2 rails-145f182ea192722ad20b76c9230150614f105431.zip |
Fix url and route helpers to follow the given example
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/routing.textile | 2 |
1 files changed, 1 insertions, 1 deletions
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 } </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. |