Files
nairobi/app/views/shared/_errors.html.erb
Juanjo Bazán 8b8c1feab7 favors underscore for resource name resolution
SpendingProposal becomes spending_proposal instead of spendingproposal
2016-01-11 12:17:10 +01:00

15 lines
504 B
Plaintext

<% if resource.errors.any? %>
<div id="error_explanation" data-alert class="alert-box alert radius">
<a href="#" class="close" title="<%= t("application.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.underscore}")) %>
<% end %>
</strong>
</div>
<% end %>