It looks like documentation references to `ring-router` are left-overs
from early README examples - I couldn't find any code that ever used the
name. The Ring router named `reitit.ring/router`.
While it didn't take too long for me to realize why my `ring-router` was
not working, I had to look the examples to figure out the name of the
function was just `router` - which was confusing since the section
header stated `reitit-router`.
- this documentation is mildly confusing when combined with hiccup's
`form-to` since hiccup forcibly transforms the method specified in
its convenience syntax: `(form-to [:delete "/my-url"] ... )` into an
upper-case string:
80e48352dd/src/hiccup/form.clj (L130)
- it's also common to get an upper-case string from elsewhere so it
seems best to wrap the hidden `_method` in `lower-case`.
"Content Negotation" was moved to its own page. This commit adds a
section with a link to the new page, similar to the way the "Exception
Handling" section is presented.
I find the clarity of this example important because the implementation of (ring/get-match) c23f591283/modules/reitit-ring/src/reitit/ring.cljc (L309) doesn't explain what's going on here.
I find the destructing of the qualified keyword `::roles` unnecessary to the example. To this end I propose using an unqualified keyword.
Additionally there is a collision between the name of the required rolls to access the route and the name of the roles held by the user making the request. To this end I propose having the roles held by the user named `:my-roles`