# \[PATCH\] to Globalize::Currency

**URL:** <https://www.ruby-forum.com/t/patch-to-globalize-currency/96941>\
**Category:** Rails I18n\
**Created:** [July 3, 2006, 4:59pm UTC](https://www.ruby-forum.com/t/patch-to-globalize-currency/96941 "2006-07-03T16:59:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [July 3, 2006, 4:59pm UTC](https://www.ruby-forum.com/t/patch-to-globalize-currency/96941/1 "2006-07-03T16:59:13Z")

</div>

Thanks Roland, got it !  
parsing is correct, I get my @cents as it should be…

unfortunatly when saving @product.save  
I get an error from Globalize::currency (not linked to your  
patch… I also got it wo the patc…Â°

RuntimeError: can only compare with money or integer

I believe it comes from my validations in Product class…

Hurry up Germany to the final… !!!

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [July 3, 2006, 6:30pm UTC](https://www.ruby-forum.com/t/patch-to-globalize-currency/96941/2 "2006-07-03T18:30:07Z")

</div>

Kad K. wrote:

> Thanks Roland, got it !  
> parsing is correct, I get my @cents as it should be…
> 
> unfortunatly when saving @product.save  
> I get an error from Globalize::currency (not linked to your  
> patch… I also got it wo the patc…Â°
> 
> RuntimeError: can only compare with money or integer
> 
> I believe it comes from my validations in Product class…  
> yes, looks like…  
> This is from your other mail:  
> script/…/config/…/app/models/product.rb:29:in `validate’

could you show us your product.rb? or look at it, line 29, somewhere  
there might be the problem 🙂  
(maybe you are comparing with a float? something like 1.5?)

> Hurry up Germany to the final… !!!  
> we’re trying hard 🙂 what’s with france? 🙂

Greetings,  
Roland
