Created
May 13, 2014 12:11
-
-
Save tboerger/dfb7add6b0753e60fedd to your computer and use it in GitHub Desktop.
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
module Haml | |
module Compiler | |
class << self | |
def build_attributes_with_dasherize(is_html, attr_wrapper, escape_attrs, attributes = {}) | |
new_attributes = {}.tap do |dasherized| | |
attributes.keys.each do |key| | |
dasherized[key.to_s.gsub("_", "-").to_sym] = attributes[key] | |
end | |
end | |
build_attributes_without_dasherize( | |
is_html, | |
attr_wrapper, | |
escape_attrs, | |
new_attributes | |
) | |
end | |
alias_method :build_attributes_without_dasherize, :build_attributes | |
alias_method :build_attributes, :build_attributes_with_dasherize | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment