Permalink
Browse files

Revert my own commit, didnt notice that this was intentional. [ci skip]

  • Loading branch information...
1 parent 87ba0b4 commit a546f7fb268846de875e017951221b5290f9f409 @saulius saulius committed May 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/routing.textile
View
2 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.

0 comments on commit a546f7f

Please sign in to comment.