Closed scorelocity closed 4 years ago
I have looked into this and have no idea what's wrong.
The route setup looks correct, and works, when you do it manually (via router {}
).
I suspected that the routes get configured for the controller in a wrong order, but this also does not seem to be the case.
I'm trying to set up routing for a controller using string ids. As I understand it, the correct way to do this is:
My controller actions that require ids are set up like (note the use of string format strings) :
However, for both of the following urls:
http://localhost:8085/books/abcde http://localhost:8085/books/abcde/edit
the show action is triggered and I see "Show handler version 1 - abcde" in my browser.
When I change this to use integer format strings in the controller actions, this works as expected, i.e. the edit action is triggered when I use the edit url.
Am I setting this routing up incorrectly? Thanks.