Created
September 4, 2011 17:32
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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