David Corbin wrote:
>Is there anyway in a route to specify the default value to use for a
>particular "fragment" if a value is not specified?
>
>
map.connect ''person/:last/:first'', :first =>
''john''
url_for(:last => ''doe'') #=>
''person/doe''
url_for(:first => ''doe'') #=>
''person/doe''
http://server/person/doe #=> {:last => ''doe'', :first
=> ''john''}
map.connect ''person/:last/:first'', :defaults => {:last
=> ''smith''}
url_for(:first => ''john'') #=>
''person/smith/john''
POPULATION EXPLOSION Unique in human experience, an event which happened
yesterday but which everyone swears won''t happen until tomorrow.
- The Hipcrime Vocab by Chad C. Mulligan