aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-20 14:02:50 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-20 14:02:50 -0700
commit68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412 (patch)
treee8eef72c46e7c548d50bf4da27fcb5bc9a899745 /actionpack/lib/action_view
parentfe9731ee674b8d7d7e06f81441fceb0499734493 (diff)
parent39b9c943b7ec5181c19461d319d8c610ea1bf941 (diff)
downloadrails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.tar.gz
rails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.tar.bz2
rails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.zip
Merge pull request #6410 from Bodacious/tag_helper_data_fix_3-2-stable
TagHelper creates invalid data attributes when value is a BigDecimal
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
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