aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-07-04 08:05:11 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2010-07-04 08:05:58 +0100
commit7d04a4be6b744fd1de9dc906a2faf83fffc9e0cc (patch)
tree7276b97669f2de185cb8609080c7d1c412e5f9e4 /railties/guides
parenta7988fcf4149ab61c83ade5d380ae5d30789efc8 (diff)
downloadrails-7d04a4be6b744fd1de9dc906a2faf83fffc9e0cc.tar.gz
rails-7d04a4be6b744fd1de9dc906a2faf83fffc9e0cc.tar.bz2
rails-7d04a4be6b744fd1de9dc906a2faf83fffc9e0cc.zip
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).
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/routing.textile6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 4e55b07ed7..00755071c5 100644
--- a/railties/guides/source/routing.textile
+++ b/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