diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-17 20:42:13 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-17 20:42:13 -0200 |
commit | ea7db8ebc11bedc2d98dac03df96bd73f6bfcf6b (patch) | |
tree | 34930aaaa88f6bbabe49dcd380190e23d62932d0 /actionpack/lib/action_view | |
parent | 2f9e880431f7a53e470164203ea82be3d2d0ca3a (diff) | |
download | rails-ea7db8ebc11bedc2d98dac03df96bd73f6bfcf6b.tar.gz rails-ea7db8ebc11bedc2d98dac03df96bd73f6bfcf6b.tar.bz2 rails-ea7db8ebc11bedc2d98dac03df96bd73f6bfcf6b.zip |
number_to_phone always return safe
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index d1c8064c1b..15f032b3d6 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -51,12 +51,9 @@ module ActionView begin Float(number) - is_number_html_safe = true rescue ArgumentError, TypeError if options[:raise] raise InvalidNumberError, number - else - is_number_html_safe = number.to_s.html_safe? end end @@ -76,7 +73,7 @@ module ActionView number.starts_with?('-') ? number.slice!(1..-1) : number end str << " x #{extension}" unless extension.blank? - is_number_html_safe ? str.html_safe : str + html_escape(str) end # Formats a +number+ into a currency string (e.g., $13.65). You can customize the format |