diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-03-04 17:09:58 -0500 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-03-04 17:09:58 -0500 |
commit | 185abfcaa5485f27fa52ad53f7b645f19332c1c7 (patch) | |
tree | 0e57a75b7f7821494d3610053d305c86bc4e03d1 /app/views/common | |
parent | ad24f46d94ad94003da412eb98d763c7a2beb863 (diff) | |
parent | c45d69d4a7e6232d088986a78f6e12a25ae7be63 (diff) |
Merge branch 'master' of http://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 %> |