Permalink
Browse files

modified error list to use .error_text css style and changed list ren…

…dering to include both the field name (attribute) and error message returned from the ActionError
  • Loading branch information...
1 parent 0bbe93d commit 4b3993562a553fe0304688af95cbd72ccfe6c25b @cwoodward cwoodward committed Jun 21, 2012
Showing with 19 additions and 5 deletions.
  1. +19 −5 knitkit/app/widgets/signup/views/error.html.erb
@@ -1,11 +1,25 @@
+
+
+
+
<div class="sexyerror">
<h2>There was an error.</h2>
<%if !@user.errors.empty?%>
<h3>Please address the following issues</h3>
+
+<hr>
+
<ul>
- <% @user.errors.messages.collect{|k,v| v}.flatten.each do |msg| %>
- <li><%=msg%></li>
- <% end %>
+ <% @user.errors.each do |attribute,error| %>
+ <li class="error_text"><%= attribute.to_s.capitalize %> : <%= error %> </li>
+ <%end%>
</ul>
- <%end%>
-</div>
+
+<%end%>
+</div>
+
+<div id="<%=widget_result_id%>_form">
+
+ <%= render "/signup_form_block" %>
+
+</div>

0 comments on commit 4b39935

Please sign in to comment.