5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:36:22 +00:00
panel/app/views/posts/_errors.haml

19 lines
498 B
Text

- 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