Created
December 28, 2010 21:22
-
-
Save andrewtheis/757736 to your computer and use it in GitHub Desktop.
This file contains 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
<%= form_for @account do |f| %> | |
<%= render "shared/form_errors", :object => @account %> | |
# ... Other form view code here ...</span> |
This file contains 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 object.errors.any? %> | |
<div id="error_explanation"> | |
<h2>Please fix the following <%= pluralize(object.errors.count, "error") %>:</h2> | |
<ul> | |
<% object.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> |
This file contains 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 @model.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@session.errors.count, "error") %> with form:</h2> | |
<ul> | |
<% @session.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment