tap/app/views/application/_errors.html.erb

15 lines
429 B
Text
Raw Normal View History

2015-04-03 23:56:13 +02:00
<% 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 %>