From 6e1a536ad46fcd26f90ce2c0c47c66df45e67012 Mon Sep 17 00:00:00 2001 From: emaxi Date: Sat, 11 Nov 2017 22:47:34 -0300 Subject: Add missing documentation options to number_to_currency [ci skip] --- actionview/lib/action_view/helpers/number_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionview') 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. # * :raise - If true, raises +InvalidNumberError+ when # the argument is invalid. + # * :strip_insignificant_zeros - 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 -- cgit v1.2.3