aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorHugo Peixoto <theorem@Nayru.(none)>2009-08-09 07:28:29 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2009-08-09 14:26:36 -0700
commit202b091373ed4d6c78adc7af5e89a359ff0fff2d (patch)
treef910173234c46910020412e0609581f842075b12 /actionpack/lib
parente1b73b975264c622f692a46eec060ff35a588d96 (diff)
downloadrails-202b091373ed4d6c78adc7af5e89a359ff0fff2d.tar.gz
rails-202b091373ed4d6c78adc7af5e89a359ff0fff2d.tar.bz2
rails-202b091373ed4d6c78adc7af5e89a359ff0fff2d.zip
Added both the documentation and a test case for the collection path name customization feature.
[#1218 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/routing/resources.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing/resources.rb b/actionpack/lib/action_controller/routing/resources.rb
index c1ebd46b48..7fd3ffd3f1 100644
--- a/actionpack/lib/action_controller/routing/resources.rb
+++ b/actionpack/lib/action_controller/routing/resources.rb
@@ -320,9 +320,10 @@ module ActionController
# notes.resources :attachments
# end
#
- # * <tt>:path_names</tt> - Specify different names for the 'new' and 'edit' actions. For example:
+ # * <tt>:path_names</tt> - Specify different path names for the actions. For example:
# # new_products_path == '/productos/nuevo'
- # map.resources :products, :as => 'productos', :path_names => { :new => 'nuevo', :edit => 'editar' }
+ # # bids_product_path(1) == '/productos/1/licitacoes'
+ # map.resources :products, :as => 'productos', :member => { :bids => :get }, :path_names => { :new => 'nuevo', :bids => 'licitacoes' }
#
# You can also set default action names from an environment, like this:
# config.action_controller.resources_path_names = { :new => 'nuevo', :edit => 'editar' }