Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document the :as option for the scope method

  • Loading branch information...
commit 7d83673134502b01bcb2fa3be07fdb84c61bb175 1 parent ffe97e3
@radar radar authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
10 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -482,7 +482,17 @@ def initialize(*args) #:nodoc:
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.