Results 1 to 4 of 4
Nov 21, 2005, 11:49 #1
- Join Date
- Nov 2005
- 0 Post(s)
- 0 Thread(s)
Outputting Currency Value from MySQL
I've created a Rails app for our intranet - a simple client tracking tool. One of the client fields I have is the monthly fee they pay for our services. In MySQL, I have this stored as a decimal type (5,2). However, when I output this in my .rhtml template, it only shows the first place after the decimal.
<td>Monthly Bill</td><td>$<%= client.bill %></td>
It is showing as "30.0" instead of "30.00".
I checked the Ruby references but couldn't find a method to output a fload to a certain precision. Any ideas?