diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-03-04 17:44:48 -0500 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-03-04 17:44:48 -0500 |
commit | 6b27e11f1613967d2b97b0eead6cf06263e6140b (patch) | |
tree | 67665de6ce65f759d4cac18d26f813343c0fe04c /app/views/common | |
parent | 489a9f7291b6b7c1143bb482f637020d82f944d5 (diff) | |
parent | 8e005f8d325a43e378f21a1042df6a4baf79c12f (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
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 %> |