Haseeb Ahmad
Haseeb Ahmad

Reputation: 8730

How to solve error of number_to_currency convert decimal to comma?

I have a column amount with type decimal. If I save 6.00 and when I get number_to_currency it change this amount to 6,00.

Anyone know what this issue?

Upvotes: 0

Views: 152

Answers (1)

Ihor
Ihor

Reputation: 297

number_to_currency formats a number into a currency based on your current locale. You can change default format by passing additional options, for example:

number_to_currency(6.00, separator: '.')

Upvotes: 1

Related Questions