obdev/app/views/devise/shared/_error_messages.html.erb

16 lines
485 B
Plaintext

<% if resource.errors.any? %>
<div id="error_explanation" class="alert alert-danger" role="alert" data-turbo-cache="false">
<h4 class="alert-heading">
<%= I18n.t("errors.messages.not_saved",
count: resource.errors.count,
resource: resource.class.model_name.human.downcase)
%>
</h4>
<ul>
<% resource.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>