summaryrefslogtreecommitdiff
path: root/app/views/common
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 17:09:00 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 17:09:00 -0500
commitf10de077a7d5d6978bcb6d1264aa14880d4ce6b0 (patch)
tree812f051acdda69aea3ff8ef006f28d96f0e4a0c7 /app/views/common
parent89cf8c1bf9b528b739794071cc035121fa962c1a (diff)
show errors when signing up
Diffstat (limited to 'app/views/common')
-rw-r--r--app/views/common/_error_messages.html.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/views/common/_error_messages.html.erb b/app/views/common/_error_messages.html.erb
new file mode 100644
index 0000000..c9fdd51
--- /dev/null
+++ b/app/views/common/_error_messages.html.erb
@@ -0,0 +1,11 @@
+<%# http://railscasts.com/episodes/211-validations-in-rails-3 %>
+<% if target.errors.any? %>
+<div id="errorExplanation">
+ <h2><%= pluralize(target.errors.count, "error") %> prohibited this record from being saved:</h2>
+ <ul>
+ <% target.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+</div>
+<% end %>