From 782a199d5dc556a5f9a080b4c51d57fc8e118860 Mon Sep 17 00:00:00 2001 From: hcatlin Date: Wed, 26 Jul 2006 15:45:09 +0000 Subject: [PATCH] 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 --- lib/haml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/haml.rb b/lib/haml.rb index 349f8a39..bf0227a2 100644 --- a/lib/haml.rb +++ b/lib/haml.rb @@ -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