mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Document the :as option for the scope method
This commit is contained in:
parent
ffe97e338e
commit
7d83673134
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue