I have a decimal column price
. I got two prices: 10.00
and 11.50
I need to transform
10.00
into 1000
11.50
into 1150
How I can do that in controller?
Just multiply the number by 100
and then do to_i on the result:
f = 10.0
n = (f * 100).to_i