Precision problem in float data type

Hi there,

I have been facing problem in displaying the value of the column which
is of type float. by default it displays only single digit after decimal
point so how can I set the precision while displaying the value of the
field in the rhtml file

thanking you

On May 21, 2007, at 7:58 AM, ruby wrote:

thanking you

You need to format it yourself as in:

<%= ‘%.2f’ % [your_value] %>


‘%.2f’ % [4.5]
=> “4.50”
=> “4.5”


Rob B.
[email protected]