mostrar un resumen de los errores

This commit is contained in:
f 2020-06-27 21:42:32 -03:00
parent 9db8215510
commit 1fa549d3a1

View file

@ -3,6 +3,19 @@
%h4= t('.errors.title')
%p= t('.errors.help')
%ul
- post.errors.each do |attribute, errors|
- if errors.size > 1
%li
%strong= post_label_t attribute, post: post
%ul
- errors.each do |error|
%li= error
- else
%li
%strong= post_label_t attribute, post: post
= errors.first
-# TODO: habilitar form_for
:ruby
if post.new?