aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/routing/routing_outside_in.txt
diff options
context:
space:
mode:
authorMike Gunderloy <MikeG1@larkfarm.com>2008-10-09 05:01:35 -0500
committerMike Gunderloy <MikeG1@larkfarm.com>2008-10-09 05:01:35 -0500
commiteeb8d1cae3981ab67face92463489ca183287193 (patch)
treeb5df05af12e1d93e52010997489613b66107e2dd /railties/doc/guides/routing/routing_outside_in.txt
parent3979d267522f9aaef92b5f21a65abab5046cefaa (diff)
downloadrails-eeb8d1cae3981ab67face92463489ca183287193.tar.gz
rails-eeb8d1cae3981ab67face92463489ca183287193.tar.bz2
rails-eeb8d1cae3981ab67face92463489ca183287193.zip
Minor change on :name_prefix and :path_prefix documentation.
Diffstat (limited to 'railties/doc/guides/routing/routing_outside_in.txt')
-rw-r--r--railties/doc/guides/routing/routing_outside_in.txt4
1 files changed, 4 insertions, 0 deletions
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: