noesya/osuny

View on GitHub
app/views/devise/shared/_error_messages.html.erb

Summary

Maintainability
Test Coverage
<% if resource.errors.any? %>
  <div id="error_explanation">
    <h2>
      <%= t("errors.messages.not_saved",
                 count: resource.errors.count,
                 resource: resource.class.model_name.human.downcase)
       %>
    </h2>
    <ul>
      <% resource.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
    </ul>
  </div>
<% end %>