Skip to content

Commit

Permalink
Fix documentation of number_to_currency helper
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rafaelfranca committed Dec 4, 2013
1 parent bad0386 commit d261c5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actionview/lib/action_view/helpers/number_helper.rb
Expand Up @@ -100,10 +100,10 @@ def number_to_phone(number, options = {})
#
# 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 = {})
delegate_number_helper_method(:number_to_currency, number, options)
end
Expand Down

0 comments on commit d261c5c

Please sign in to comment.