1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Document the :module and :path options for the scope method.

This commit is contained in:
Ryan Bigg 2010-11-07 10:38:45 +10:00
parent 35c7ca5c37
commit 5040ecbfea

View file

@ -467,12 +467,21 @@ module ActionDispatch
# Used to route <tt>/photos</tt> (without the prefix <tt>/admin</tt>)
# to Admin::PostsController:
# === Supported options
# [:module]
# If you want to route /posts (without the prefix /admin) to
# Admin::PostsController, you could use
#
# Examples:
# scope :module => "admin" do
# resources :posts
# end
# [:path]
# If you want to prefix the route, you could use
#
# scope :module => "admin" do
# resources :posts
# end
# scope :path => "/admin" do
# resources :posts
# end
# This will prefix all of the +posts+ resource's requests with '/admin'
def scope(*args)
options = args.extract_options!
options = options.dup