From 208fb2920d6c6c6be97a7086cea24f4c8220010c Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 3 Nov 2010 06:20:26 +0100 Subject: made a pass to the docs of :negative_format --- actionpack/lib/action_view/helpers/number_helper.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (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 42e2100099..a9400c347f 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -86,11 +86,13 @@ module ActionView # * :unit - Sets the denomination of the currency (defaults to "$"). # * :separator - Sets the separator between the units (defaults to "."). # * :delimiter - Sets the thousands delimiter (defaults to ","). - # * :format - Sets the format of the output string (defaults to "%u%n"). - # * :negative_format - Sets the format of the output string (defaults to "-" + :format). The field types are: - # - # %u The currency unit - # %n The number + # * :format - Sets the format for non-negative numbers (defaults to "%u%n"). + # Fields are %u for the currency, and %n + # for the number. + # * :negative_format - Sets the format for negative numbers (defaults to prepending + # an hyphen to the formatted number given by :format). + # Accepts the same fields than :format, except + # %n is here the absolute value of the number. # # ==== Examples # number_to_currency(1234567890.50) # => $1,234,567,890.50 -- cgit v1.2.3