Andrew Zhuk
Andrew Zhuk

Reputation: 500

Ruby on Rails number_to_currency how to do without Unit [without symbol, $ or other]

How to format my number with the helper number_to_currency, but show it without the currency symbol ($, R$, etc)?
Ex.:

$ 500,78  -> Not what i want
  500,78  -> Format i desire

Upvotes: 6

Views: 5779

Answers (1)

MurifoX
MurifoX

Reputation: 15089

Try using it with the :unit option set to empty string.

number_to_currency(1234567890.50, :unit => "")

Upvotes: 19

Related Questions