Rails routes with prefix before the :id

This works:
map.connect ‘/bananas/pdf/file/:id.pdf’, :controller =>
‘bananas’, :action => ‘pdf’

This doesn’t work:
map.connect ‘/bananas/pdf/file_:id.pdf’, :controller =>
‘bananas’, :action => ‘pdf’

So once I change the slash to underscore the route doesn’t work the
way I expect it to.
Is there some way I need to escape the routes to make them work (Rails

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs