From 7d83673134502b01bcb2fa3be07fdb84c61bb175 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 7 Nov 2010 12:11:39 +1000 Subject: Document the :as option for the scope method --- actionpack/lib/action_dispatch/routing/mapper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 8244773877..ba0911c635 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -482,7 +482,17 @@ module ActionDispatch # scope :path => "/admin" do # resources :posts # end + # # This will prefix all of the +posts+ resource's requests with '/admin' + # + # [:as] + # Prefixes the routing helpers in this scope with the specified label. + # + # scope :as => "sekret" do + # resources :posts + # end + # + # Helpers such as +posts_path+ will now be +sekret_posts_path+ def scope(*args) options = args.extract_options! options = options.dup -- cgit v1.2.3