提交 0eef4e3b 编写于 作者: R Ryan Bigg

Document the :path option for namespace

上级 379939e1
......@@ -544,6 +544,17 @@ def controller(controller, options={})
# admin_post GET /admin/posts/:id(.:format) {:action=>"show", :controller=>"admin/posts"}
# admin_post PUT /admin/posts/:id(.:format) {:action=>"update", :controller=>"admin/posts"}
# admin_post DELETE /admin/posts/:id(.:format) {:action=>"destroy", :controller=>"admin/posts"}
# === Supported options
#
# The +:path+, +:as+, +:module+, +:shallow_path+ and +:shallow_prefix+ all default to the name of the namespace.
#
# [:path]
# The path prefix for the routes.
#
# namespace :admin, :path => "sekret" do
# resources :posts
# end
#
def namespace(path, options = {})
path = path.to_s
options = { :path => path, :as => path, :module => path,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册