From c82025fcd6f5da92448a1362b38c0a0a9e966a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 4 Dec 2013 10:20:01 -0200 Subject: Fix documentation of number_to_currency helper Now users have to explicit mark the unit as safe if they trust it. Closes #13161 --- actionpack/lib/action_view/helpers/number_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index eee9e59a24..2e04ff453d 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -129,10 +129,10 @@ module ActionView # # number_to_currency(-1234567890.50, :negative_format => "(%u%n)") # # => ($1,234,567,890.50) - # number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "") - # # => £1234567890,50 - # number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "", :format => "%n %u") - # # => 1234567890,50 £ + # number_to_currency(1234567890.50, :unit => "R$", :separator => ",", :delimiter => "") + # # => R$1234567890,50 + # number_to_currency(1234567890.50, :unit => "R$", :separator => ",", :delimiter => "", :format => "%n %u") + # # => 1234567890,50 R$ def number_to_currency(number, options = {}) return unless number -- cgit v1.2.3