number_with_precision返回整数

我对number_with_precision()number_to_currency()有一个非常奇怪的问题。

在我的应用程序中,如果我没有设置:precision ,它们都会引发comparison of String with 0 failedcomparison of String with 0 failed

但是当我在irb中尝试相同的function时,一切都很好:

 1.9.3p0 :058 > helper.number_with_precision(12) => "12.000" 1.9.3p0 :059 > helper.number_to_currency(12) => "12.00 €" 

我查看了我的Gemfile,猜测它可能来自我的一个gem,但我没有找到任何东西。

我有一种奇怪的感觉,有些东西覆盖了number_with_delimiter() ,造成了这个错误,但我找不到什么。

仅供参考,我使用Rails 3.2.1和ruby 1.9.1,这是我的Gemfile: https ://gist.github.com/2847099

谢谢你提前。

Interesting Posts