summaryrefslogtreecommitdiff
path: root/app/views/common/_error_messages.html.erb
blob: fdeaf65d7f4ec3da2629b79c8d63bdf6664826f4 (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="error_explanation">
  <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 %>