aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/routing.textile
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-07-07 05:31:54 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2010-07-07 05:32:26 +0100
commit0f96cea322294f84df34c43000443b249a880126 (patch)
treed18c05fdf8ea339151f9744cdeec3b5d89c3efcf /railties/guides/source/routing.textile
parentffdbe56d996a2992de44c6823263f8fea19c2d61 (diff)
downloadrails-0f96cea322294f84df34c43000443b249a880126.tar.gz
rails-0f96cea322294f84df34c43000443b249a880126.tar.bz2
rails-0f96cea322294f84df34c43000443b249a880126.zip
Add note about incompatibility of namespace and :controller
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r--railties/guides/source/routing.textile6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 00755071c5..72a76e25bb 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -382,6 +382,12 @@ match ':controller/:action/:id/:user_id'
An incoming URL of +/photos/show/1/2+ will be dispatched to the +show+ action of the +PhotosController+. +params[:id]+ will be +"1"+, and +params[:user_id]+ will be +"2"+.
+NOTE: You can't use +namespace+ or +:module+ with a +:controller+ path segment. If you need to do this then use a constraint on :controller that matches the namespace you require. e.g:
+
+<ruby>
+match ':controller(/:action(/:id))', :controller => /admin\/[^\/]+/
+</ruby>
+
h4. Static Segments
You can specify static segments when creating a route: