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