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
You need to format it yourself as in:
<%= '%.2f' % [your_value] %>
Compare: >> '%.2f' % [4.5] => "4.50" >> 4.5.to_s => "4.5"
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com