Closes Ticket #4.
Now, when non-string values are passed into an attribute hash for a tag, they will have #to_s called on them, and then be in the proper format. ALL numeric values are also put in quotes. git-svn-id: svn://hamptoncatlin.com/haml/trunk@11 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
5b1819d977
commit
782a199d5d
|
@ -96,7 +96,7 @@ module HAML
|
||||||
|
|
||||||
def build_attributes(attributes = {})
|
def build_attributes(attributes = {})
|
||||||
return "" if attributes.empty?
|
return "" if attributes.empty?
|
||||||
" " + (attributes.collect { |attr_name, val| attr_name.to_s + "='" + val + "'" }).join(" ")
|
" " + (attributes.collect { |attr_name, val| attr_name.to_s + "='" + val.to_s + "'" }).join(" ")
|
||||||
end
|
end
|
||||||
|
|
||||||
def close_tag
|
def close_tag
|
||||||
|
|
Loading…
Reference in New Issue