aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-11-07 12:05:14 +1000
committerRyan Bigg <radarlistener@gmail.com>2010-11-07 12:05:14 +1000
commit0eef4e3bfb3435f2906c70c19ff896393f94abdf (patch)
tree865dfff27d6de399b9785fa700608fc7ce3633b5 /actionpack
parent379939e1e00519e819c71a53c28f9032f473aa04 (diff)
downloadrails-0eef4e3bfb3435f2906c70c19ff896393f94abdf.tar.gz
rails-0eef4e3bfb3435f2906c70c19ff896393f94abdf.tar.bz2
rails-0eef4e3bfb3435f2906c70c19ff896393f94abdf.zip
Document the :path option for namespace
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 10b1342f30..f0d3ef80ab 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -544,6 +544,17 @@ module ActionDispatch
# 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,