Forum: Ruby on Rails Rails routes with prefix before the :id

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4e90f7036d8c36d0a0417ef588679220?d=identicon&s=25 Sharcho (Guest)
on 2009-05-07 18:33
(Received via mailing list)
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
2.1.2)?
This topic is locked and can not be replied to.