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

Unexpected validation failure with decimal properties #63

Description

@jabr

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"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions