I18nFloat is a Ruby gem to use with Rails. I18nFloat allows your users to use format number like “1 200,84” in forms. ActiveRecord Float attributes don’t care anymore if you like commas or dots!.
With this gem loaded, your users are able to use comma style decimal in forms.
Here are current features but ideas and contributions are welcome:
- comma for decimals
- whitespace as separator
- standard format still usable
- only a gem in your Gemfile and you’re good to go
Let’s say you’ve got a Marathon model with a Float columns named
If you want to contribute you should take a look at:
Source can be cloned using Mercurial on my Bitbucket repo.
Problems, comments, and suggestions are welcome on the tracker.
This gem is released under the MIT license.