Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document the :as option for the namespace method

  • Loading branch information...
commit 45525713f98c09ed3984525557d5ebd264d1025e 1 parent 4228318
@radar radar authored fxn committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
8 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -538,6 +538,14 @@ def controller(controller, options={})
# # 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,

0 comments on commit 4552571

Please sign in to comment.
Something went wrong with that request. Please try again.