Sha256: f40449e1ff2de443c5ec77afc97fc0f91ef7f6aac04902a71056fd0f31d1ba65
Contents?: true
Size: 370 Bytes
Versions: 22
Compression:
Stored size: 370 Bytes
Contents
class Division < Sequel::Model set_primary_key(:id) plugin(:timestamps, :update_on_create => true) plugin(:validation_helpers) many_to_one(:league) one_to_many(:teams) self.raise_on_save_failure = false self.raise_on_typecast_failure = false def validate validates_numeric(:league_id, :only_integer => true) validates_presence(:name) end end
Version data entries
22 entries across 22 versions & 1 rubygems