Blog-App-Buffalo icon indicating copy to clipboard operation
Blog-App-Buffalo copied to clipboard

Error printing template helper

Open alexeyismirnov opened this issue 1 year ago • 0 comments

In every template you have the following snippet for printing error messages:

 <%= if (errors) { %>
  <%= for (key, val) in errors { %>
...
  <% } %>
<% } %>

Would not it be nice to refactor it into a template helper similar to what you did for CSRF token in render.go ?

That would reduce the amount of template code significantly and make it more readable.

alexeyismirnov avatar Jul 01 '23 06:07 alexeyismirnov