From 83e891cf94d7e03e979f3d565c717ab2726dac00 Mon Sep 17 00:00:00 2001 From: Jonathan Roes Date: Fri, 20 Jan 2012 10:12:05 -0500 Subject: document `:raise` option support for several helpers [ci skip] --- actionpack/lib/action_view/helpers/number_helper.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index 43122ef2ba..5cc3ec1b10 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -264,6 +264,7 @@ module ActionView # * :delimiter - Sets the thousands delimiter (defaults to ""). # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator # (defaults to +false+). + # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. # # ==== Examples # number_with_precision(111.2345) # => 111.235 @@ -343,6 +344,7 @@ module ActionView # * :delimiter - Sets the thousands delimiter (defaults to ""). # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator (defaults to +true+) # * :prefix - If +:si+ formats the number using the SI prefix (defaults to :binary) + # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. # ==== Examples # number_to_human_size(123) # => 123 Bytes # number_to_human_size(1234) # => 1.21 KB @@ -424,6 +426,7 @@ module ActionView # * *integers*: :unit, :ten, :hundred, :thousand, :million, :billion, :trillion, :quadrillion # * *fractionals*: :deci, :centi, :mili, :micro, :nano, :pico, :femto # * :format - Sets the format of the output string (defaults to "%n %u"). The field types are: + # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. # # %u The quantifier (ex.: 'thousand') # %n The number -- cgit v1.2.3