summaryrefslogtreecommitdiff
path: root/app/views/common/_error_messages.html.erb
blob: 731f62c141d5b64dd5c4e2be344262628e95ba1b (plain)
1
2
3
4
5
6
7
8
9
10
11
<%# http://railscasts.com/episodes/211-validations-in-rails-3 %>
<% if target.errors.any? %>
<div id="errorExplanation">
  <h2><%= pluralize(target.errors.count, "error") %> prohibited this form from being submitted:</h2>
  <ul>
  <% target.errors.full_messages.each do |msg| %>
    <li><%= msg %></li>
  <% end %>
  </ul>
</div>
<% end %>