Skip to content

Instantly share code, notes, and snippets.

@yasuoza
Created August 16, 2012 08:32
Show Gist options
  • Save yasuoza/3368420 to your computer and use it in GitHub Desktop.
Save yasuoza/3368420 to your computer and use it in GitHub Desktop.
Rails customize error Message HTML
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
errors = Array(instance.error_message).join(',')
%(#{html_tag}<span class="validation-error">&nbsp;#{errors}</span>).html_safe
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment