Created
December 1, 2011 01:19
-
-
Save steveclarke/1412518 to your computer and use it in GitHub Desktop.
Error messages for object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @obj.errors.any? %> | |
<div class="error-messages"> | |
<h2><%= pluralize(@obj.errors.count, 'error') %> are preventing this object from being created:</h2> | |
<ul> | |
<% @obj.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also style
.field_with_errors