On Wed, Apr 1, 2009 at 7:02 AM, Joseph Palermo <jpale...@pivotallabs.com> wrote: > > I've got a route: > map.find_stuff "/find_stuff/:near", :controller => > "find_stuff", :action => "show" > > Where the :near portion is user specified, so when users enter a place > with a period, the route doesn't match correctly. So I change it to > this: > map.find_stuff "/find_stuff/:near", :near => /[^?]*/, :controller => > "find_stuff", :action => "show" > > This works correctly, the route will grab everything up to the > question mark if there is one and put it into the near param.
Does it work correctly even without the ? option? (i.e. :near=>/./). Then the helpers should escape the value correctly and generate URLs which can be recognized correctly. The current behaviour is 'intentional', because you're meant to get a routing error out the other side when you try to generate a route which wouldn't be 'round trippable'. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---