_error_messages.html.erb 399 B

123456789101112131415
  1. <% if resource.errors.any? %>
  2. <div id="alert alert-danger">
  3. <h2>
  4. <%= I18n.t("errors.messages.not_saved",
  5. count: resource.errors.count,
  6. resource: resource.class.model_name.human.downcase)
  7. %>
  8. </h2>
  9. <ul>
  10. <% resource.errors.full_messages.each do |message| %>
  11. <li><%= message %></li>
  12. <% end %>
  13. </ul>
  14. </div>
  15. <% end %>