Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Unexpected validation failure with decimal properties #63

Open
jabr opened this issue Jun 20, 2013 · 0 comments
Open

Unexpected validation failure with decimal properties #63

jabr opened this issue Jun 20, 2013 · 0 comments

Comments

@jabr
Copy link

jabr commented Jun 20, 2013

I'm seeing an unexpected validation failure with decimal properties. Also, I'm using the release-1.2 branch.

A simple testcase:

class Model
  include DataMapper::Resource
  property :duration, Decimal
end

m = Model.new
m.duration = BigDecimal.new(1.01, 3)
m.save # raises DataMapper::SaveFailureError
m.errors[:duration] # => ["Duration must be a number"]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant