From 59e89facc2264322bcab59c9a8622380b62d4d40 Mon Sep 17 00:00:00 2001 From: Slobodan Kovacevic Date: Thu, 10 Jun 2010 14:58:02 +0200 Subject: Added :locale option explanation for number_to_currency --- actionpack/lib/action_view/helpers/number_helper.rb | 2 ++ 1 file changed, 2 insertions(+) (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 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 + # * :locale - Sets the locale to be used for formatting (defaults to current locale). # * :precision - Sets the level of precision (defaults to 2). # * :unit - Sets the denomination of the currency (defaults to "$"). # * :separator - 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 -- cgit v1.2.3