This project is archived and is in readonly mode.

#3255 ✓wontfix
Harm Aarts

Parameter :requirements in routing doesn't use implicit anchors

Reported by Harm Aarts | September 24th, 2009 @ 10:22 AM

Consider the following route:
map.detail "subscription_plans/:provider/:plan", :action =>
"detail", :requirements => {:plan => /[^ ]+/}

I want this route to match any string without a space character. So
"Telfort-100" matches "Telfort 100" does not. This however does not work. It matches both.

I believed this to be correct but it's not. Including anchors ('\A'
'$' etc) is not allowed and the docs seem to suggest they are implicit.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages