Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document the :path option for namespace

  • Loading branch information...
commit e777b914c8455f68e56ec4a41fb524358aa45d5c 1 parent 1287fdd
@radar radar authored fxn committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
11 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -512,6 +512,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,
Please sign in to comment.
Something went wrong with that request. Please try again.