Replies: 1 comment 3 replies
-
Hey! 👋 The "Reverse URL resolution" concept is important to the framework and is heavily documented. The rationale behind this naming is that it performs the reverse operation of the route pattern matching process (where a route/handler association is resolved based on a given URL path). As such, given a route name and optional parameters, the Additionally, handlers and templates are components that may not necessarily be used by the same audience: handlers will likely be written by Crystal developers while templates could be written by frontend developers that may not be familiar with the "reverse URL resolution" concept. That's why the For these reasons, I don't think the |
Beta Was this translation helpful? Give feedback.
-
Right now, in templates, URL names are dereferenced using
{% url "route:to:dereference" %}
. In handlers, what seems like the same functionality is calledreverse("route:to:dereference")
.Could Marten consider changing
reverse
tourl
for the handlers as well?marten/src/marten/routing/reverser.cr
Line 20 in 4ae28f0
Beta Was this translation helpful? Give feedback.
All reactions