URL params with a period
suggest changeIf you want to support a URL parameter more complex than an id number, you may run into trouble with the parser if the value contains a period. Anything following a period will be assumed to be a format (for example, JSON or XML).
You can work around this limitation with a constraint that broadens the accepted input. /.*/ also matches slashes and an empty segment. Match one path segment instead:
resources :users, constraints: { id: /[^\/]+/ }
For example, this lets the id be an email address.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents