diff options
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r-- | railties/guides/source/routing.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 29c729592b..0823fb14e3 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -655,7 +655,7 @@ You can use the +:constraints+ option to specify a required format on the implic resources :photos, :constraints => {:id => /[A-Z][A-Z][0-9]+/} </ruby> -This declaration constraints the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match. +This declaration constrains the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match. You can specify a single constraint to apply to a number of routes by using the block form: |