mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Require active_support/core_ext/string/output_safety and use html_safe rather than use non-public SafeBuffer API.
This commit is contained in:
parent
9c8242ee6a
commit
3703a8ae9b
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
require 'abstract_unit'
|
||||
require 'active_support/number_helper'
|
||||
require 'active_support/core_ext/string/output_safety'
|
||||
|
||||
module ActiveSupport
|
||||
module NumberHelper
|
||||
|
@ -97,7 +98,7 @@ module ActiveSupport
|
|||
assert_equal("123,456,789.78901", number_helper.number_to_delimited(123456789.78901))
|
||||
assert_equal("0.78901", number_helper.number_to_delimited(0.78901))
|
||||
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78"))
|
||||
assert_equal("123,456.78", number_helper.number_to_delimited(ActiveSupport::SafeBuffer.new("123456.78")))
|
||||
assert_equal("123,456.78", number_helper.number_to_delimited("123456.78".html_safe))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue