1
0
Fork 0
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:
Ryan Bigg 2010-11-07 12:11:39 +10:00
parent ffe97e338e
commit 7d83673134

View file

@ -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