diff options
author | Slobodan Kovacevic <basti@orangeiceberg.com> | 2010-06-10 14:58:02 +0200 |
---|---|---|
committer | Slobodan Kovacevic <basti@orangeiceberg.com> | 2010-06-10 14:58:02 +0200 |
commit | 59e89facc2264322bcab59c9a8622380b62d4d40 (patch) | |
tree | f50a0190587cf317966b359d3bd42094a618ce16 /actionpack/lib/action_view | |
parent | 751f79a03351f1f0d21436b2b947352b97ded093 (diff) | |
download | rails-59e89facc2264322bcab59c9a8622380b62d4d40.tar.gz rails-59e89facc2264322bcab59c9a8622380b62d4d40.tar.bz2 rails-59e89facc2264322bcab59c9a8622380b62d4d40.zip |
Added :locale option explanation for number_to_currency
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index fccf004adf..c0b3804860 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -82,6 +82,7 @@ module ActionView # 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 @@ module ActionView # 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 |