Skip to content

Commit

Permalink
Added form_erros partial and fixed a require
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkd authored and phaza committed Jul 6, 2010
1 parent e95e2cb commit 67f8712
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'generators/simple_form_erb'
require 'generators/erb/scaffold/scaffold_generator'
require 'rails/generators/erb/scaffold/scaffold_generator'

module SimpleFormErb
module Generators
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%% if resource.errors.any? -%>
<div id="errorExplanation">
<h2><%%= "#{pluralize(resource.errors.count, "error")} prohibited this #{resource.class.name.titleize} from being saved:" %></h2>
<ul>
<%%- resource.errors.full_messages.each do |msg| -%>
<li><%%= msg %></li>
<%%- end -%>
</ul>
</div>
<%% end -%>

0 comments on commit 67f8712

Please sign in to comment.