Skip to content

Commit

Permalink
Document the :path option for namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Nov 7, 2010
1 parent 379939e commit 0eef4e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -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,
Expand Down

0 comments on commit 0eef4e3

Please sign in to comment.