diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-20 10:49:54 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 10:49:54 +0900 |
commit | 103b02f1524beaa5c773f95dce6892dad3805d4f (patch) | |
tree | 360e060d3c11624941d705c172e9b735436e747b /actionview | |
parent | 2247077b0bed3423c8b1a9529d2cb89482f0019c (diff) | |
parent | 6e1a536ad46fcd26f90ce2c0c47c66df45e67012 (diff) | |
download | rails-103b02f1524beaa5c773f95dce6892dad3805d4f.tar.gz rails-103b02f1524beaa5c773f95dce6892dad3805d4f.tar.bz2 rails-103b02f1524beaa5c773f95dce6892dad3805d4f.zip |
Merge pull request #31132 from emaxi/feature/add-missing-documentation-option-to-number-to-currency
Add missing documentation option to number_to_currency
[ci skip]
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/number_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index 4b53b8fe6e..35206b7e48 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -100,6 +100,9 @@ module ActionView # absolute value of the number. # * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when # the argument is invalid. + # * <tt>:strip_insignificant_zeros</tt> - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). # # ==== Examples # @@ -117,6 +120,8 @@ module ActionView # # => R$1234567890,50 # number_to_currency(1234567890.50, unit: "R$", separator: ",", delimiter: "", format: "%n %u") # # => 1234567890,50 R$ + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" def number_to_currency(number, options = {}) delegate_number_helper_method(:number_to_currency, number, options) end |