Round

Hello,
In my application form db I become double,
for example 10 => 10.00 or 10.2 => 10.20

id it possible?
Is there any function in Rails to it?

Bober wrote:

Hello,
In my application form db I become double,
for example 10 => 10.00 or 10.2 => 10.20

id it possible?
Is there any function in Rails to it?

Pure ruby:

puts “%02.02f” % 10
puts “%02.02f” % 10.2