This project is archived and is in readonly mode.
Rails.application.routes.recognize_path returning incorrect hash
-
andy (at stonean)
- Title changed from Rails.application.routes.recognize_path returning invalid hash to Rails.application.routes.recognize_path returning incorrect hash
-
David Trasbo
- State changed from new to invalid
- Importance changed from to Low
This is in fact the intended behavior. Rails allows the
:idfragment to contain a wide range of characters, not just numbers. Perhapsindexis a bit unintuitive, but imagine a request to/users/john. Clearly we don't want thejohnaction, but a user whose name (which acts as an id in this example) isjohn, e.g. -
andy (at stonean)
Yeah, I agree completely. Just something that caught me by surprise and, at first, appeared incorrect.
Thank you for the response and explanation.