diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2010-11-07 12:07:29 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2010-11-07 12:07:41 +1000 |
commit | 6ca042b3e4078b694e827e0f3de51712a0cb4420 (patch) | |
tree | e41693c4d8b064237f21cbcf8c2158e331ab5532 /actionpack | |
parent | 66d1276d7f38ddb002f1dd48e77cea383497f57d (diff) | |
download | rails-6ca042b3e4078b694e827e0f3de51712a0cb4420.tar.gz rails-6ca042b3e4078b694e827e0f3de51712a0cb4420.tar.bz2 rails-6ca042b3e4078b694e827e0f3de51712a0cb4420.zip |
Document the :as option for the namespace method
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 34d49591e2..73c2ac3497 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -570,6 +570,14 @@ module ActionDispatch # # code go here # end # + # [:as] + # Changes the name used in routing helpers for this namespace. + # + # namespace :admin, :as => "sekret" do + # resources :posts + # end + # + # Routing helpers such as +admin_posts_path+ will now be +sekret_posts_path+. def namespace(path, options = {}) path = path.to_s options = { :path => path, :as => path, :module => path, |