Skip to content

Instantly share code, notes, and snippets.

@ugisozols
Created August 17, 2010 18:05
Show Gist options
  • Save ugisozols/531185 to your computer and use it in GitHub Desktop.
Save ugisozols/531185 to your computer and use it in GitHub Desktop.
# /refinerycms/vendor/refinerycms/images/app/views/admin/images/_form.html.erb
<%#= f.error_messages %>
<%= render "/shared/admin/error_messages", :object => @image %>
# /refinerycms/vendor/refinerycms/core/app/views/shared/admin/_error_messages.html.erb
<% if object.errors.any? %>
<div class="errorExplanation" id="errorExplanation">
<p><%= pluralize(object.errors.count, "error") %> prohibited this resource from being saved:</p>
<ul>
<% object.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment