From 39b9c943b7ec5181c19461d319d8c610ea1bf941 Mon Sep 17 00:00:00 2001 From: Bodacious Date: Sun, 20 May 2012 20:42:16 +0100 Subject: Fixed tag_helper data-attribute bug with BigDecimals --- actionpack/lib/action_view/helpers/tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 2b0dd96435..7f58a27d6a 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -138,7 +138,7 @@ module ActionView options.each_pair do |key, value| if key.to_s == 'data' && value.is_a?(Hash) value.each do |k, v| - if !v.is_a?(String) && !v.is_a?(Symbol) + unless v.is_a?(String) || v.is_a?(Symbol) || v.is_a?(BigDecimal) v = v.to_json end v = ERB::Util.html_escape(v) if escape -- cgit v1.2.3