aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-18 10:32:57 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-18 10:33:33 -0300
commit816b35e781271b0466b3f76a7c3241874331008d (patch)
tree57d202c9ea3aa274facfa957ffe9a18348cb5a6d /activesupport/lib
parent77e4f317ecc7ebfc765cebdf997f033fa2d27969 (diff)
downloadrails-816b35e781271b0466b3f76a7c3241874331008d.tar.gz
rails-816b35e781271b0466b3f76a7c3241874331008d.tar.bz2
rails-816b35e781271b0466b3f76a7c3241874331008d.zip
Fix examples of number_to_percentage
[ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/number_helper.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb
index 414960d2b1..54cff6d394 100644
--- a/activesupport/lib/active_support/number_helper.rb
+++ b/activesupport/lib/active_support/number_helper.rb
@@ -244,14 +244,14 @@ module ActiveSupport
#
# ==== Examples
#
- # number_to_percentage(100) # => 100.000%
- # number_to_percentage('98') # => 98.000%
- # number_to_percentage(100, precision: 0) # => 100%
- # number_to_percentage(1000, delimiter: '.', separator: ,') # => 1.000,000%
- # 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) # => 100.000%
+ # number_to_percentage('98') # => 98.000%
+ # number_to_percentage(100, precision: 0) # => 100%
+ # number_to_percentage(1000, delimiter: '.', separator: ',') # => 1.000,000%
+ # 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 %
def number_to_percentage(number, options = {})
return unless number
options = options.symbolize_keys