tap/app/views/application/_form_errors.html.erb
2014-12-09 14:39:27 +01:00

14 lines
425 B
Text

<% if object.errors.any? %>
<div class="panel panel-danger form-errors">
<div class="panel-heading">
<%= pluralize(object.errors.count, "error") %> prohibited this <%= object.class.name.downcase %> from being saved:
</div>
<div class="panel-body">
<ul>
<% object.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
</div>
<% end %>