<% if !(record.nil?) %> <% if record.errors.any? %>

<%= t('errors.template.header', :model => record.class.model_name.human, :count => record.errors.count) %>

<% end %> <% end %>