Sha256: a3627fb45d9f9675a5c9c700589b6433c4f18631b0964d6cf8cb91079ff6d96c

Contents?: true

Size: 673 Bytes

Versions: 4

Compression:

Stored size: 673 Bytes

Contents

# -*- coding: utf-8 -*-

module DataMapper
  module Validation
    module Fixtures
      class BasketballPlayer
        #
        # Behaviors
        #

        include DataMapper::Resource

        #
        # Properties
        #

        property :id,     Serial

        without_auto_validations do
          property :name,   String
          property :height, Float
          property :weight, Float
        end

        #
        # Validations
        #

        # precision and scale need to be defined for length to be validated
        validates_numericality_of :height, :weight, :precision => 10
      end
    end # Fixtures
  end # Validations
end # DataMapper

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sbf-dm-validations-1.4.0 spec/fixtures/basketball_player.rb
sbf-dm-validations-1.3.0 spec/fixtures/basketball_player.rb
sbf-dm-validations-1.3.0.beta spec/fixtures/basketball_player.rb
aequitas-0.0.1 spec_legacy/fixtures/basketball_player.rb