mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 03:51:41 +00:00
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')
|
||||
%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?
|
||||
|
|
Loading…
Reference in a new issue