This project is archived and is in readonly mode.
named routes does not handle parameters with a "." in the values
-
Jean-Marc Lagacé
- Title changed from named routes does not handle parameters with a "." in the values to why it is important (well at least to me)
My urls contains the user name of the users on the site. I am allowing the "." as part of the name...
I can disable that feature but it's a bit silly a simple "." would crash it
-
Jean-Marc Lagacé
- Title changed from why it is important (well at least to me) to named routes does not handle parameters with a "." in the values
-
Pratik
- Assigned user set to Michael Koziarski
- State changed from new to incomplete
Could you submit a failing test case please ?
-
Jean-Marc Lagacé
Hi Micheal,
While putting a failing test case in place I found a way to make it work without changing any of the ActionPack code. A few reasons motivated trying to find an alternative... the main one is that the decimal point allows the Route to determine if there is a format present in the URL when parsing it.
Using the :requirements parameter of the route configuration I was finally able to put an email address as part of a named route.
So... should I document it through a test... how should we proceed?
thanks!
Jean-Marc
-
Ryan Bigg
- State changed from incomplete to wontfix
The idea here is if you want dots in your ids and you're not using formats it's probably best to do something like this:
map.resources :dummies, :requirements => {:id => /[a-zA-Z0-9\.\-_]+/ } -
Lucas Húngaro
I think you don't understood: this works for resources but not for named routes. I have this issue on Rails 2.3.5