Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Routing - Receptors with a dot in the name

#75

Hi,

I'm not sure if this is bug or a feature, but it took me some time to understand so that's why I'm asking about it. Here's my configuration:

I have a fairly typical UploadsController and in my routes.rb file I added a named route with the line:

map.request_upload '/indir/:random_id/:filename', :controller => 'uploads', :action => 'request_file'

But when I visit a URL such that the :filename receptor has a dot in the name, I get a routing error. An example URL is http://localhost:3000/indir/7245... which spits a routing error. When the URL is something like http://localhost:3000/indir/7245... then the route is recognized. I am using Rails revision 9248 from the SVN repository.

Reported by Tayfun · May 1st, 2008 @ 01:59 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Carl Porth
    Carl Porth

    Try passing a Regexp in your route definition like this:

    map.request_upload '/indir/:random_id/:filename', :controller => 'uploads', :action => 'request_file', :filename => /.*/
    

    May 28th, 2008 @ 03:29 AM

  2. josh
    josh
    • State changed from new to wontfix
    • Tag set to routing

    July 17th, 2008 @ 01:59 AM