Files
nairobi/app/views/shared/_errors.html.erb
Álvaro Durán Tovar 92ae988251 adds close button to alert boxes, also adds
data-alert attribute to enable javascript
on them
2015-09-06 19:54:12 +02:00

15 lines
467 B
Plaintext

<% if resource.errors.any? %>
<div id="error_explanation" data-lert 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 %>