<% if resource.errors.any? %>
  <div id="error_explanation" data-alert class="alert-box alert radius">
    <a href="#" class="close">&times;</a>

    <strong>
      <%= pluralize resource.errors.count, t("form.error"), t("form.errors") %>

      <% if local_assigns[:message].present? %>
        <%= message %>
      <% else %>
        <%= t("form.not_saved", resource: t("form.#{resource.class.to_s.downcase}")) %>
      <% end %>
    </strong>
  </div>
<% end %>