aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-02 22:04:11 +0100
committerXavier Noria <fxn@hashref.com>2011-02-02 22:04:11 +0100
commita96a9a494856c57bb8773d8d22bbee176cda9d6e (patch)
tree809c810883599b60cb66537e9403cb7c1d5ad335 /actionpack/lib/action_dispatch/routing.rb
parent68e3fb81090ba67575e513407fc2463dba3b002b (diff)
parent2446b1307ecf4ac13dc9ed3bcaf5a03ef3fcef98 (diff)
downloadrails-a96a9a494856c57bb8773d8d22bbee176cda9d6e.tar.gz
rails-a96a9a494856c57bb8773d8d22bbee176cda9d6e.tar.bz2
rails-a96a9a494856c57bb8773d8d22bbee176cda9d6e.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionpack/lib/action_dispatch/routing.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb
index 8810227a59..43fd93adf6 100644
--- a/actionpack/lib/action_dispatch/routing.rb
+++ b/actionpack/lib/action_dispatch/routing.rb
@@ -56,6 +56,18 @@ module ActionDispatch
# resources :posts, :comments
# end
#
+ # Alternately, you can add prefixes to your path without using a separate
+ # directory by using +scope+. +scope+ takes additional options which
+ # apply to all enclosed routes.
+ #
+ # scope :path => "/cpanel", :as => 'admin' do
+ # resources :posts, :comments
+ # end
+ #
+ # For more, see <tt>Routing::Mapper::Resources#resources</tt>,
+ # <tt>Routing::Mapper::Scoping#namespace</tt>, and
+ # <tt>Routing::Mapper::Scoping#scope</tt>.
+ #
# == Named routes
#
# Routes can be named by passing an <tt>:as</tt> option,