Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add counterexample for regex [ci skip]

  • Loading branch information...
commit 1d36963754d4bb0fdd563c3354ff8aae805577a0 1 parent 25e7515
@ptn ptn authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  guides/source/routing.md
View
2  guides/source/routing.md
@@ -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}/
Please sign in to comment.
Something went wrong with that request. Please try again.