diff options
author | Bodacious <gavin@katanacode.com> | 2012-05-20 20:42:16 +0100 |
---|---|---|
committer | Bodacious <gavin@katanacode.com> | 2012-05-20 20:42:16 +0100 |
commit | 39b9c943b7ec5181c19461d319d8c610ea1bf941 (patch) | |
tree | da061ad89f24205d734b1d217ca30aaf26b93526 /actionpack/lib/action_view/helpers | |
parent | 6ef9fda1a39f45e2d18aba4881f60a19589a2c77 (diff) | |
download | rails-39b9c943b7ec5181c19461d319d8c610ea1bf941.tar.gz rails-39b9c943b7ec5181c19461d319d8c610ea1bf941.tar.bz2 rails-39b9c943b7ec5181c19461d319d8c610ea1bf941.zip |
Fixed tag_helper data-attribute bug with BigDecimals
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/tag_helper.rb | 2 |
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 |