Hi,
What is the best way to format amount in RoR?
e.g $12000.937 => $12,000.94
Thanks,
Hari
Hi,
What is the best way to format amount in RoR?
e.g $12000.937 => $12,000.94
Thanks,
Hari
On Jun 8, 2006, at 5:33 PM, Nara H. wrote:
Hi,
What is the best way to format amount in RoR?
e.g $12000.937 => $12,000.94
Thanks,
Hari
You can grab the code from: http://wiki.rubygarden.org/Ruby/page/
show/NumericFormat
and put it into your lib directory and add a require to your
environment.rb.
or just look at http://api.rubyonrails.org/classes/ActionView/Helpers/
NumberHelper.html#M000449
-Rob
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs