Created
April 20, 2012 00:59
-
-
Save andrewculver/2425103 to your computer and use it in GitHub Desktop.
Temporary fix for the extra newline (
) Rails 3.2.3 + Haml are adding to the output of the text_area form helper.
This file contains hidden or 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
module ActionView | |
module Helpers | |
module FormHelper | |
def text_area(object_name, method, options = {}) | |
html = InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options) | |
html.gsub(/>\
/, '>').html_safe | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI this will work fine for ugly mode, but in indented mode it will add spaces after the opening textarea tag.