tap/app/views/shared/_error_messages.html.erb
2014-11-10 02:30:42 +01:00

12 lines
No EOL
308 B
Text

<% if object.errors.any? %>
<div id="error_explanation">
<div class="alert alert-danger">
The form contains <%= pluralize(object.errors.count, "error") %>.
</div>
<ul>
<% object.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>