Permalink
Browse files

Add counterexample for regex [ci skip]

  • Loading branch information...
1 parent 25e7515 commit 1d36963754d4bb0fdd563c3354ff8aae805577a0 @ptn ptn committed Dec 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/routing.md
View
@@ -634,7 +634,7 @@ You can use the `:constraints` option to enforce a format for a dynamic segment:
get 'photos/:id', to: 'photos#show', constraints: { id: /[A-Z]\d{5}/ }
```
-This route would match paths such as `/photos/A12345`. You can more succinctly express the same route this way:
+This route would match paths such as `/photos/A12345`, but not `/photos/893`. You can more succinctly express the same route this way:
```ruby
get 'photos/:id', to: 'photos#show', id: /[A-Z]\d{5}/

0 comments on commit 1d36963

Please sign in to comment.