From 6ca042b3e4078b694e827e0f3de51712a0cb4420 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 7 Nov 2010 12:07:29 +1000 Subject: Document the :as option for the namespace method --- actionpack/lib/action_dispatch/routing/mapper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/lib') 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, -- cgit v1.2.3