Forum: Ruby on Rails weird problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
86fbe1d13676473496f4b39421466f7c?d=identicon&s=25 Scott Pn (darkomen1234)
on 2007-07-17 04:52
Ok so I have an entry in the database that sets the discount of a
product, and I have it as a decimal.
Here is what I used when I created the table:

t.column :discount, :decimal, :precision => 3, :scale => 2, :default =>

However, when I create a new product and add the discount to like 10.0%
it always comes out as 9.99. Does anyone know why it is doing this?
This topic is locked and can not be replied to.