I have a Rails route that takes stock ticker symbols as the :id
feeds/AMZN will return a page for Amazonfeeds/AMZN.csv will ret
Old question, but I found a much simpler way that works with nested routes (I'm on Rails 3.2.4). This way allows all characters (including the dot) as opposed to the accepted answer which makes you specify the allowed charcters.
resources :feeds, :id => /([^\/])+?/
Note that I had found some other suggestions (e.g. here: http://coding-journal.com/rails-3-routing-parameters-with-dots/) of doing something like:
resources :feeds, :id => /.*/
but that didn't work for me with nested routes for some reason.