No commit activity in last 3 years
No release in over 3 years
In Rails, you can store prices as a decimal with precision 8 and scale 2. This gem ensures that your templates print them like prices.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.5.2
>= 0
~> 2.3.0
 Project Readme

BigDecimal Price

Did you know that decimal columns are great for storing prices in Rails apps?

Well, they are.

This little gem ensures that if you have, say a price column on a database, when you call that price method on your model, it will come out formatted like a price.

eg.

<%= @item.price %>

will out put 10.90, even if the decimal value is 10.9

Installation

Just add this to your gemfile:

gem 'big_decimal_price'

Lovely.

== Copyright

Copyright (c) 2011 Paul Campbell. See LICENSE.txt for further details.