aboutsummaryrefslogtreecommitdiffstats
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:27:14 -0200
commitd261c5cc28d35ae3d493c42edd20d362b61556dc (patch)
treef6826b180643cd24df651ad70da9c6b9115776f8
parentbad0386bc0ed4f180e436d605897831430aa50c9 (diff)
downloadrails-d261c5cc28d35ae3d493c42edd20d362b61556dc.tar.gz
rails-d261c5cc28d35ae3d493c42edd20d362b61556dc.tar.bz2
rails-d261c5cc28d35ae3d493c42edd20d362b61556dc.zip
Fix documentation of number_to_currency helper
Now users have to explicit mark the unit as safe if they trust it. Closes #13161 Conflicts: actionpack/lib/action_view/helpers/number_helper.rb actionpack/test/template/number_helper_i18n_test.rb
-rw-r--r--actionview/lib/action_view/helpers/number_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb
index 13387078a4..ad825cd1f1 100644
--- a/actionview/lib/action_view/helpers/number_helper.rb
+++ b/actionview/lib/action_view/helpers/number_helper.rb
@@ -100,10 +100,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 = {})
delegate_number_helper_method(:number_to_currency, number, options)
end