aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-12-04 10:20:01 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-12-04 10:22:46 -0200
commitc82025fcd6f5da92448a1362b38c0a0a9e966a12 (patch)
tree2de69c5d6e60bf644243c660bb2ff370a3d48f70 /actionpack/lib/action_view/helpers
parent9c60e3df9f202e8db37bea4ddddef47605075bcc (diff)
downloadrails-c82025fcd6f5da92448a1362b38c0a0a9e966a12.tar.gz
rails-c82025fcd6f5da92448a1362b38c0a0a9e966a12.tar.bz2
rails-c82025fcd6f5da92448a1362b38c0a0a9e966a12.zip
Fix documentation of number_to_currency helper
Now users have to explicit mark the unit as safe if they trust it. Closes #13161
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb8
1 files changed, 4 insertions, 4 deletions
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 => "&pound;", :separator => ",", :delimiter => "")
- # # => &pound;1234567890,50
- # number_to_currency(1234567890.50, :unit => "&pound;", :separator => ",", :delimiter => "", :format => "%n %u")
- # # => 1234567890,50 &pound;
+ # 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