mostrar un resumen de los errores
This commit is contained in:
parent
9db8215510
commit
1fa549d3a1
1 changed files with 13 additions and 0 deletions
|
@ -3,6 +3,19 @@
|
||||||
%h4= t('.errors.title')
|
%h4= t('.errors.title')
|
||||||
%p= t('.errors.help')
|
%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
|
-# TODO: habilitar form_for
|
||||||
:ruby
|
:ruby
|
||||||
if post.new?
|
if post.new?
|
||||||
|
|
Loading…
Reference in a new issue