Merge pull request #21710 from amitsuroliya/correct_result

Correcting output of `number_to_percentage` example in `number_helper…
This commit is contained in:
Claudio B. 2015-09-21 23:43:40 -07:00
commit 2a7e8f54c6
2 changed files with 2 additions and 2 deletions

@ -139,7 +139,7 @@ def number_to_currency(number, options = {})
# number_to_percentage(302.24398923423, precision: 5) # => 302.24399%
# number_to_percentage(1000, locale: :fr) # => 1 000,000%
# number_to_percentage("98a") # => 98a%
# number_to_percentage(100, format: "%n %") # => 100 %
# number_to_percentage(100, format: "%n %") # => 100.000 %
#
# number_to_percentage("98a", raise: true) # => InvalidNumberError
def number_to_percentage(number, options = {})

@ -118,7 +118,7 @@ def number_to_currency(number, options = {})
# number_to_percentage(1000, locale: :fr) # => 1 000,000%
# number_to_percentage:(1000, precision: nil) # => 1000%
# number_to_percentage('98a') # => 98a%
# number_to_percentage(100, format: '%n %') # => 100 %
# number_to_percentage(100, format: '%n %') # => 100.000 %
def number_to_percentage(number, options = {})
NumberToPercentageConverter.convert(number, options)
end