# Strange behaviour in Currency

**URL:** <https://www.ruby-forum.com/t/strange-behaviour-in-currency/96760>\
**Category:** Rails I18n\
**Created:** [July 1, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/strange-behaviour-in-currency/96760 "2006-07-01T16:37:16Z")\
**Posts on this page:** 1\
**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 1, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/strange-behaviour-in-currency/96760/1 "2006-07-01T16:37:16Z")

</div>

I installed Globalize today wo any problem…

config/environment.rb :  
…  
include Globalize  
Locale.set\_base\_language(‘fr-FR’)

date is correctly localized, static texte too.  
.  
my only problem is with current…

in my DB (test data) I have a price column (integer)  
the Model is :

class Product \< ActiveRecord::Base  
composed\_of :price, :class\_name =\> “Globalize::Currency”, :mapping  
=\> [%w(price cents)]

the list view display the price

  
\<%= product.date\_available.localize("%d %B %Y") %\>  
  
**$\<%= product.price %\>**  

but I get : (the dollar currency is still there !)  
26 Janvier 2005  
$30,00 â?¬

LAst question

is how I define the price entry in my view  
i suppose that what I wrote is now sufficient :

Prix  
\<%= text\_field 'product', 'price' %\>

thansk for yoru help to a newrubies…

kad
