diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 3d32529..ef9f51a 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -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?