Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reword routing guide so that we talk about prefixing as a use of :as …

…rather than as a specific prefixing option (which :name_prefix used to be).
  • Loading branch information...
commit 7d04a4be6b744fd1de9dc906a2faf83fffc9e0cc 1 parent a7988fc
@pixeltrix pixeltrix authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/guides/source/routing.textile
View
6 railties/guides/source/routing.textile
@@ -645,9 +645,9 @@ scope :path_names => { :new => "make" } do
end
</ruby>
-h4. Overriding the Named Helper Prefix
+h4. Prefixing the Named Route Helpers
-You can use the :as option to rename the named route helpers that Rails generates for a route. You can use this option to prevent collisions between routes using a path scope.
+You can use the +:as+ option to prefix the named route helpers that Rails generates for a route. Use this option to prevent name collisions between routes using a path scope.
<ruby>
scope "admin" do
@@ -659,7 +659,7 @@ resources :photos
This will provide route helpers such as +admin_photos_path+, +new_admin_photo_path+ etc.
-You could specify a name prefix to use for a group of routes in the scope:
+To prefix a group of routes, use +:as+ with +scope+:
<ruby>
scope "admin", :as => "admin" do
Please sign in to comment.
Something went wrong with that request. Please try again.