aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
Diffstat (limited to 'guides')
-rw-r--r--guides/source/routing.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/routing.textile b/guides/source/routing.textile
index 0773a96c67..51d7c85fca 100644
--- a/guides/source/routing.textile
+++ b/guides/source/routing.textile
@@ -486,7 +486,7 @@ get 'photos/:id' => 'photos#show', :id => /[A-Z]\d{5}/
+:constraints+ takes regular expressions with the restriction that regexp anchors can't be used. For example, the following route will not work:
<ruby>
-get '/:id' => 'posts#show', :constraints => {:id => /^\d/}
+get '/:id' => 'posts#show', :constraints => {:id => /\d/}
</ruby>
However, note that you don't need to use anchors because all routes are anchored at the start.