diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-10 11:19:26 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-10 11:32:28 +0100 |
commit | 0bcbcdfdad1e082ba7740a5d60c61eb3349b670a (patch) | |
tree | 9a3dc8cc645c6700493b1313f6d09a3307d2884c /actionpack/lib/action_view | |
parent | 90c4885766d08bc8779d325df1fff4c8ffc85f3c (diff) | |
download | rails-0bcbcdfdad1e082ba7740a5d60c61eb3349b670a.tar.gz rails-0bcbcdfdad1e082ba7740a5d60c61eb3349b670a.tar.bz2 rails-0bcbcdfdad1e082ba7740a5d60c61eb3349b670a.zip |
Ensure number helpers can handle HTML safe strings - closes #1597.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index 4dafb7739a..fe0288521f 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -211,7 +211,7 @@ module ActionView defaults = I18n.translate(:'number.format', :locale => options[:locale], :default => {}) options = options.reverse_merge(defaults) - parts = number.to_s.split('.') + parts = number.to_s.to_str.split('.') parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{options[:delimiter]}") parts.join(options[:separator]).html_safe |