Skip to content

Commit

Permalink
Document the :as option for the scope method
Browse files Browse the repository at this point in the history
  • Loading branch information
radar authored and fxn committed Nov 15, 2010
1 parent 0db8412 commit 06402b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -445,7 +445,17 @@ def initialize(*args) #:nodoc:
# scope :path => "/admin" do # scope :path => "/admin" do
# resources :posts # resources :posts
# end # end
#
# This will prefix all of the +posts+ resource's requests with '/admin' # 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) def scope(*args)
options = args.extract_options! options = args.extract_options!
options = options.dup options = options.dup
Expand Down

0 comments on commit 06402b0

Please sign in to comment.