Anexar a un atributo en Enlive
¿Es posible agregar un valor a un atributo utilizando enlive?
ejemplo: tengo esto
<a href="/item/edit/">edit</a>
y me gustaría esto
<a href="/item/edit/123">edit</a>
Actualmente estoy haciendo esto:
(html/defsnippet foo "views/foo.html" [:#main]
[ctxt]
[:a] (html/set-attr :href (str "/item/edit/" (ctxt :id))))
Pero preferiría no incrustar la URL en mi código, simplemente agregando el ID a la URL existente
(html/defsnippet foo "views/foo.html" [:#main]
[ctxt]
[:a@href] (html/append (ctxt :id)))