开发者

un-localizing user input in rails

开发者 https://www.devze.com 2023-03-15 18:00 出处:网络
I have a rails form where the user inputs lo开发者_开发技巧calized data (e.g. currency values like 12,40 instead of 12.40). How do I un-localize this to put into the database?I\'ve used the money gem

I have a rails form where the user inputs lo开发者_开发技巧calized data (e.g. currency values like 12,40 instead of 12.40). How do I un-localize this to put into the database?


I've used the money gem before with good results. It supports localization and parsing of input based on currency

0

精彩评论

暂无评论...
验证码 换一张
取 消