2014-12-09 13:41:35 +01:00
|
|
|
<% if model.errors.any? %>
|
|
|
|
<div class="panel panel-danger form-errors">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<%= pluralize(model.errors.count, "error") %> prohibited this <%= model.class.name.downcase %> from being saved:
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<ul>
|
|
|
|
<% model.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|