Added :locale option explanation for number_to_currency
This commit is contained in:
parent
751f79a033
commit
59e89facc2
@ -82,6 +82,7 @@ def number_to_phone(number, options = {})
|
||||
# in the +options+ hash.
|
||||
#
|
||||
# ==== Options
|
||||
# * <tt>:locale</tt> - Sets the locale to be used for formatting (defaults to current locale).
|
||||
# * <tt>:precision</tt> - Sets the level of precision (defaults to 2).
|
||||
# * <tt>:unit</tt> - Sets the denomination of the currency (defaults to "$").
|
||||
# * <tt>:separator</tt> - Sets the separator between the units (defaults to ".").
|
||||
@ -95,6 +96,7 @@ def number_to_phone(number, options = {})
|
||||
# number_to_currency(1234567890.50) # => $1,234,567,890.50
|
||||
# number_to_currency(1234567890.506) # => $1,234,567,890.51
|
||||
# number_to_currency(1234567890.506, :precision => 3) # => $1,234,567,890.506
|
||||
# number_to_currency(1234567890.506, :locale => :fr) # => 1,234,567,890.506 €
|
||||
#
|
||||
# number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "")
|
||||
# # => £1234567890,50
|
||||
|
Loading…
Reference in New Issue
Block a user