aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper.rb
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2015-08-28 15:33:48 +0200
committerRobin Dupret <robin.dupret@gmail.com>2015-08-28 15:33:48 +0200
commit7a27de2bb055ea35c4396ac818d20b0e5aa44ab4 (patch)
tree094aadbc59069533cd1861a9558223e2e0c4361a /activesupport/lib/active_support/number_helper.rb
parentac1c888b95481cb66df8175952403b447fffe7e8 (diff)
downloadrails-7a27de2bb055ea35c4396ac818d20b0e5aa44ab4.tar.gz
rails-7a27de2bb055ea35c4396ac818d20b0e5aa44ab4.tar.bz2
rails-7a27de2bb055ea35c4396ac818d20b0e5aa44ab4.zip
Tiny documentation improvements [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/number_helper.rb')
-rw-r--r--activesupport/lib/active_support/number_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb
index 5ab0f0a7ea..9762d95145 100644
--- a/activesupport/lib/active_support/number_helper.rb
+++ b/activesupport/lib/active_support/number_helper.rb
@@ -136,8 +136,8 @@ module ActiveSupport
# * <tt>:separator</tt> - Sets the separator between the
# fractional and integer digits (defaults to ".").
# * <tt>:delimiter_pattern</tt> - Sets a custom regular expression used for
- # for deriving, the placement of delimiter. Helpful when using currency
- # formats like INR.
+ # deriving the placement of delimiter. Helpful when using currency formats
+ # like INR.
#
# ==== Examples
#
@@ -150,9 +150,10 @@ module ActiveSupport
# number_to_delimited(12345678.05, locale: :fr) # => 12 345 678,05
# number_to_delimited('112a') # => 112a
# number_to_delimited(98765432.98, delimiter: ' ', separator: ',')
- # number_helper.number_to_delimited("123456.78",
- # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) # => 1,23,456.78
- # # => 98 765 432,98
+ # # => 98 765 432,98
+ # number_to_delimited("123456.78",
+ # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/)
+ # # => 1,23,456.78
def number_to_delimited(number, options = {})
NumberToDelimitedConverter.convert(number, options)
end