Open vgchl opened 11 years ago
FYI, my current fix is overriding the field setter:
def price=(price)
price = price.to_money if price.respond_to? :to_money
self[:price] = price
end
Could you post a pull request for these improvements? Thanks!
In the next release I would like to remove all Mongoid 2 support and improve the Mongoid 3+ support ;) You wanna help out?
The
demongoize
method only supports an initial value that is a hash. When submitting a form, this value is a string, causingTypeErrors
.Have a look at this class from money-rails, whose
demongoize
method is a bit more robust.