- unless post.errors.empty? - title = t('.errors.title') - help = t('.errors.help') = render 'bootstrap/alert' do %h4= title %p= 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