Skip to content

Instantly share code, notes, and snippets.

@elliotcm
Created September 4, 2011 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliotcm/1193180 to your computer and use it in GitHub Desktop.
Save elliotcm/1193180 to your computer and use it in GitHub Desktop.
Insert this into your application.rb Application class to get spans instead of divs in form errors. Rails 3.1.0 version.
# Fuck you and your fucking divs
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
include ActionView::Helpers::OutputSafetyHelper
raw %(<span class="field-with-errors">#{html_tag}</span>)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment