rails/rails — Issue #4136: Route constraints match empty strings in 3.2 ?
Author: jdelStrother
Created: 2011-12-22 16:46:12+00:00
State: open

Hi,
I have the following route :

get ':username'=>'users#show', :username=>/[^\/]+/

for 'twitter style' profile urls, routing http://localhost:3000/foo to {:controller=>'users', :action=>'show', :username=>'foo'}

Under 3.2, this constraint now seems to match an empty string : if I visit http://localhost:3000/, it calls the users#show action with {"username"=>""} as a parameter.

Am I doing something wrong, or does it need further investigation?