提交 5040ecbf 编写于 作者: R Ryan Bigg

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

上级 35c7ca5c
......@@ -467,12 +467,21 @@ def initialize(*args) #:nodoc:
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册