Skip to content
Browse files

Routing guide: clarify what the :as option does for scopes

  • Loading branch information...
1 parent 9aef64f commit 224e2d478a825c312128a1b3c2797d0a95fd7109 @radar radar committed Dec 31, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/guides/source/routing.textile
View
4 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.

0 comments on commit 224e2d4

Please sign in to comment.
Something went wrong with that request. Please try again.