aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-11-07 12:11:39 +1000
committerRyan Bigg <radarlistener@gmail.com>2010-11-07 12:11:39 +1000
commit7d83673134502b01bcb2fa3be07fdb84c61bb175 (patch)
treefbf5e72b13c76843d87cdcf96062c512142980e8 /actionpack/lib/action_dispatch/routing/mapper.rb
parentffe97e338eda6ba2ba946753a8dc4ec64c8968b0 (diff)
downloadrails-7d83673134502b01bcb2fa3be07fdb84c61bb175.tar.gz
rails-7d83673134502b01bcb2fa3be07fdb84c61bb175.tar.bz2
rails-7d83673134502b01bcb2fa3be07fdb84c61bb175.zip
Document the :as option for the scope method
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 8244773877..ba0911c635 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -482,7 +482,17 @@ module ActionDispatch
# scope :path => "/admin" do
# resources :posts
# end
+ #
# This will prefix all of the +posts+ resource's requests with '/admin'
+ #
+ # [:as]
+ # Prefixes the routing helpers in this scope with the specified label.
+ #
+ # scope :as => "sekret" do
+ # resources :posts
+ # end
+ #
+ # Helpers such as +posts_path+ will now be +sekret_posts_path+
def scope(*args)
options = args.extract_options!
options = options.dup