Re: Re: Localized Floats


I agree, floats aren’t suited for monetary values. There’s a Currency
in my plugin for that, meant to be used with the rails composed_of
The actual value is stored in the database as an integer.

It’s true that
overriding to_s can break code which relies on Numerics formatting a

I don’t think this will be an issue for most rails apps, and overriding
to_s makes things a lot easier. If it’s a problem in a specific app, one
always disable the override.

— removed_email_address@domain.invalid wrote:

I’m developing an app in german, and here in Germany our Float

numbers are separated by a comma instead of a dot. I.e.: 150,00

instead of 150.00

Floats are unsuited for monetary values and
some other things, even
though they are often misused for it. Most of
the time it won’t matter,
but in some cases it will, therefore it’s better
to do it right in the