Skip to content

Commit

Permalink
document :raise option support for several helpers [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Roes authored and prasath committed Feb 7, 2012
1 parent 3b3b511 commit 4d821ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actionpack/lib/action_view/helpers/number_helper.rb
Expand Up @@ -271,6 +271,7 @@ def number_with_delimiter(number, options = {})
# * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to "").
# * <tt>:strip_insignificant_zeros</tt> - If +true+ removes insignificant zeros after the decimal separator
# (defaults to +false+).
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# ==== Examples
# number_with_precision(111.2345) # => 111.235
Expand Down Expand Up @@ -350,6 +351,7 @@ def number_with_precision(number, options = {})
# * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to "").
# * <tt>:strip_insignificant_zeros</tt> - If +true+ removes insignificant zeros after the decimal separator (defaults to +true+)
# * <tt>:prefix</tt> - If +:si+ formats the number using the SI prefix (defaults to :binary)
# * <tt>:raise</tt> - 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
Expand Down Expand Up @@ -431,6 +433,7 @@ def number_to_human_size(number, options = {})
# * *integers*: <tt>:unit</tt>, <tt>:ten</tt>, <tt>:hundred</tt>, <tt>:thousand</tt>, <tt>:million</tt>, <tt>:billion</tt>, <tt>:trillion</tt>, <tt>:quadrillion</tt>
# * *fractionals*: <tt>:deci</tt>, <tt>:centi</tt>, <tt>:mili</tt>, <tt>:micro</tt>, <tt>:nano</tt>, <tt>:pico</tt>, <tt>:femto</tt>
# * <tt>:format</tt> - Sets the format of the output string (defaults to "%n %u"). The field types are:
# * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
#
# %u The quantifier (ex.: 'thousand')
# %n The number
Expand Down

0 comments on commit 4d821ed

Please sign in to comment.