Skip to content

Commit

Permalink
Fix examples of number_to_percentage
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
rafaelfranca committed Jul 18, 2013
1 parent 77e4f31 commit 816b35e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions activesupport/lib/active_support/number_helper.rb
Expand Up @@ -244,14 +244,14 @@ def number_to_currency(number, options = {})
# #
# ==== Examples # ==== Examples
# #
# number_to_percentage(100) # => 100.000% # number_to_percentage(100) # => 100.000%
# number_to_percentage('98') # => 98.000% # number_to_percentage('98') # => 98.000%
# number_to_percentage(100, precision: 0) # => 100% # number_to_percentage(100, precision: 0) # => 100%
# number_to_percentage(1000, delimiter: '.', separator: ,') # => 1.000,000% # number_to_percentage(1000, delimiter: '.', separator: ',') # => 1.000,000%
# number_to_percentage(302.24398923423, precision: 5) # => 302.24399% # number_to_percentage(302.24398923423, precision: 5) # => 302.24399%
# number_to_percentage(1000, locale: :fr) # => 1 000,000% # number_to_percentage(1000, locale: :fr) # => 1 000,000%
# number_to_percentage('98a') # => 98a% # number_to_percentage('98a') # => 98a%
# number_to_percentage(100, format: '%n %') # => 100 % # number_to_percentage(100, format: '%n %') # => 100 %
def number_to_percentage(number, options = {}) def number_to_percentage(number, options = {})
return unless number return unless number
options = options.symbolize_keys options = options.symbolize_keys
Expand Down

0 comments on commit 816b35e

Please sign in to comment.