amount_formatter

This project is supposed to offer an alternative to ActiveSupport’s number_to_currency-method, as it is fataly slow for some applications, that makes heavy use of it.

Installation

Add to your Gemfile and bundle:

gem "amount_formatter"

Usage

Format amounts like this:

AmountFormatter.format(1234.12, precision: 2) #=> 1,234.12

I18n support

Add this to an initializer:

AmountFormatter.locale_engine = :i18n

And then use AmountFormatter as normal.

Contributing to amount_formatter

Copyright © 2014 Kasper Johansen. See LICENSE.txt for further details.