How do I convert "1e+06" to "1,000,000" in RoR edit view?

When I enter "1000000" into my RoR new form it shows up as "1e+06" in a mysql float field.

Maybe this is a mysql question, but is there a way to get this to appear as "1000000" in my RoR edit form field? It translates fine in the RoR show view but not the edit view.

I'm actually using this as currency value

Suggest you use the decimal/numeric type then. Floating point numbers aren't accurate, and you I'm sure you don't want rounding errors in your books.

Note that you'll have to update to rails 1.2 for proper decimal support.

There's also Kernel#sprintf if all you care about is formatting your floats.

Isak

also so want to keep the float