diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-04 17:09:00 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-04 17:09:00 -0500 |
commit | f10de077a7d5d6978bcb6d1264aa14880d4ce6b0 (patch) | |
tree | 812f051acdda69aea3ff8ef006f28d96f0e4a0c7 /app/views/common | |
parent | 89cf8c1bf9b528b739794071cc035121fa962c1a (diff) |
show errors when signing up
Diffstat (limited to 'app/views/common')
-rw-r--r-- | app/views/common/_error_messages.html.erb | 11 |
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 %> |