hey,

Im using merb 1.0.4 and have a Datamapper resource definied like this:

class ArticlePrice
  include DataMapper::Resource
...
  property :net, BigDecimal, :nullable => false, :precision =>
8, :scale => 2, :default => 0.0
...

But I can't save any numbers correctly. I tried the following (merb -
i):
p = ArticlePrice.new(:net => 2.22)
p.net.to_s
  => "0.222E1"

This also causes some problems in the view, e.g. when there are
validation errors and the view will be rendered twice. What shall I do
to access the BigDecimal correctly? Are there some dm-gems, I have
forgotten?

Thanks in advance,
benni



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to