Sha256: 5e8ebb3015d6c168a343b30089fdceec153dd8f2484ea6df81652b586439c5e6

Contents?: true

Size: 351 Bytes

Versions: 1

Compression:

Stored size: 351 Bytes

Contents

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

class City
  #
  # Behaviors
  #

  include DataMapper::Resource

  #
  # Properties
  #

  property :id,         Serial
  property :name,       String

  property :founded_in, Integer, :auto_validation => false

  #
  # Validations
  #

  validates_is_number :founded_in, :message => "Foundation year must be an integer"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-validations-0.10.2 spec/fixtures/city.rb