mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
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
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ module HAML
|
|||
|
||||
def build_attributes(attributes = {})
|
||||
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
|
||||
|
||||
def close_tag
|
||||
|
|
Loading…
Add table
Reference in a new issue