I want to create a Rails 3 route with entirely optional parameters. The example broken route is:
match '(/name/:name)(/height/:height)(/weight/:weight)' => 'people#index'
Which results in 'rake:routes' yielding:
/(/name/:name)(/height/:height)(/weight/:weight)
And thus adding an initial slash to all links:
<a href="//name/kevin">...</a>
The route works if I specify it as:
match '/people(/name/:name)(/height/:height)(/weight/:weight)' => 'people#index'
But I want to have this as the root URL (as with the first example, which does not work). Thanks.