aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/routing.textile
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-12-31 17:50:37 +1000
committerRyan Bigg <radarlistener@gmail.com>2010-12-31 17:50:37 +1000
commit224e2d478a825c312128a1b3c2797d0a95fd7109 (patch)
treecf10a65db4d941a551b3ca67f4f1197cfb1ac439 /railties/guides/source/routing.textile
parent9aef64f7a347cdc1eab70b44f55a050e28af5074 (diff)
downloadrails-224e2d478a825c312128a1b3c2797d0a95fd7109.tar.gz
rails-224e2d478a825c312128a1b3c2797d0a95fd7109.tar.bz2
rails-224e2d478a825c312128a1b3c2797d0a95fd7109.zip
Routing guide: clarify what the :as option does for scopes
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r--railties/guides/source/routing.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index b1cef26932..f60d72352d 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -704,7 +704,7 @@ resources :photos
This will provide route helpers such as +admin_photos_path+, +new_admin_photo_path+ etc.
-To prefix a group of routes, use +:as+ with +scope+:
+To prefix a group of route helpers, use +:as+ with +scope+:
<ruby>
scope "admin", :as => "admin" do
@@ -714,7 +714,7 @@ end
resources :photos, :accounts
</ruby>
-This will generate routes such as +admin_photos_path+ and +admin_accounts_path+.
+This will generate routes such as +admin_photos_path+ and +admin_accounts_path+ which map to +/admin/photos+ and +/admin/accounts+ respectively.
NOTE: The +namespace+ scope will automatically add +:as+ as well as +:module+ and +:path+ prefixes.