I've been looking all over, and really just need a definitive answer to ride on. I'm going to have an object that contains percentages compiled from other objects, the point here is, what's the standard for representing a percentage in rails, without it getting broken in data migrations and things like that.
+1
A:
If you use :decimal
as the type, they'll get converted into BigDecimal
s. Be sure to specify :precision
and :scale
in your migration, lest Rails decide that you really wanted an integer instead.
Pesto
2009-07-28 18:40:31