Problem in number_helper.rb ?

esox_ch
2008-12-06T14:01:50Z

Hello,

Today I noticed that the number_to_currency helper didn''t work anymore
(it just returned the numeric value, without any currency).
I tracked down the error and saw that editing line 89
( number_to_currency method) as follows solved the problem :

Old piece of code :

begin
    format.gsub(/%n/, number_with_precision(number,
      :precision => precision,
      :delimiter => delimiter,
      :separator => separator)
      ).gsub(/%u/, unit)
rescue
    number
end

New one :

begin
    format.gsub(/%n/, number_with_precision(number,
      :precision => precision,
      :delimiter => delimiter,
      :separator => separator).to_s
      ).gsub(/%u/, unit)
rescue
    number
end

Is it an issue with Rails ?

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---