This gem provides extra methods for the AR model to display number as a currency.
Lets assume you have a Fee model with amount property. Add next line to the Fee model.
as_currency :total
After that you have a brand new method total_as_currency that going to return a currency friendly value from the total property.
@fee.total_as_currency
By the way, you can add as many fields to the as_currency as you want, for instance:
as_currency :total, :budget, :salary
You will get 3 more methods to display particular value as a currency.
Copyright © 2012 Bogdan Kulbida. See LICENSE.txt for further details.