Skip to content

Commit

Permalink
made a pass to the docs of :negative_format
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Nov 3, 2010
1 parent c4d977f commit 208fb29
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions actionpack/lib/action_view/helpers/number_helper.rb
Expand Up @@ -86,11 +86,13 @@ def number_to_phone(number, options = {})
# * <tt>:unit</tt> - Sets the denomination of the currency (defaults to "$"). # * <tt>:unit</tt> - Sets the denomination of the currency (defaults to "$").
# * <tt>:separator</tt> - Sets the separator between the units (defaults to "."). # * <tt>:separator</tt> - Sets the separator between the units (defaults to ".").
# * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to ","). # * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to ",").
# * <tt>:format</tt> - Sets the format of the output string (defaults to "%u%n"). # * <tt>:format</tt> - Sets the format for non-negative numbers (defaults to "%u%n").
# * <tt>:negative_format</tt> - Sets the format of the output string (defaults to "-" + :format). The field types are: # Fields are <tt>%u</tt> for the currency, and <tt>%n</tt>
# # for the number.
# %u The currency unit # * <tt>:negative_format</tt> - Sets the format for negative numbers (defaults to prepending
# %n The number # an hyphen to the formatted number given by <tt>:format</tt>).
# Accepts the same fields than <tt>:format</tt>, except
# <tt>%n</tt> is here the absolute value of the number.
# #
# ==== Examples # ==== Examples
# number_to_currency(1234567890.50) # => $1,234,567,890.50 # number_to_currency(1234567890.50) # => $1,234,567,890.50
Expand Down

0 comments on commit 208fb29

Please sign in to comment.