From eeb8d1cae3981ab67face92463489ca183287193 Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Thu, 9 Oct 2008 05:01:35 -0500 Subject: Minor change on :name_prefix and :path_prefix documentation. --- railties/doc/guides/routing/routing_outside_in.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/doc/guides/routing') diff --git a/railties/doc/guides/routing/routing_outside_in.txt b/railties/doc/guides/routing/routing_outside_in.txt index c3dc60c8bf..1e070dac46 100644 --- a/railties/doc/guides/routing/routing_outside_in.txt +++ b/railties/doc/guides/routing/routing_outside_in.txt @@ -384,6 +384,8 @@ Routes recognized by this entry would include: NOTE: In most cases, it's simpler to recognize URLs of this sort by creating nested resources, as discussed in the next section. +NOTE: You can also use +:path_prefix+ with non-RESTful routes. + ==== Using :name_prefix You can use the :name_prefix option to avoid collisions between routes. This is most useful when you have two resources with the same name that use +:path_prefix+ to map differently. For example: @@ -396,6 +398,8 @@ map.resources :photos, :path_prefix => '/agencies/:agency_id', :name_prefix => ' This combination will give you route helpers such as +photographer_photos_path+ and +agency_edit_photo_path+ to use in your code. +NOTE: You can also use +:name_prefix+ with non-RESTful routes. + === Nested Resources It's common to have resources that are logically children of other resources. For example, suppose your application includes these models: -- cgit v1.2.3