I am using Rails 3.2.2 and I would like to store and handle a percentage value in a my database table column. What do you advice about (for example, what type - :integer
, :float
, :decimal
, ... - of the column should I set)? Is there some alert that I must/should know about storing percentage values?
The precision should be 2 (1.99%
, 50.01%
, ...).
Note: I read this post.