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

Version Path
merb-admin-0.8.8 spec/models/sequel/division.rb
merb-admin-0.8.7 spec/models/sequel/division.rb
merb-admin-0.8.6 spec/models/sequel/division.rb
merb-admin-0.8.1 spec/models/sequel/division.rb
merb-admin-0.8.0 spec/models/sequel/division.rb
merb-admin-0.7.6 spec/models/sequel/division.rb
merb-admin-0.7.5 spec/models/sequel/division.rb
merb-admin-0.7.4 spec/models/sequel/division.rb
merb-admin-0.7.3 spec/models/sequel/division.rb
merb-admin-0.7.2 spec/models/sequel/division.rb
merb-admin-0.7.1 spec/models/sequel/division.rb
merb-admin-0.7.0 spec/models/sequel/division.rb
merb-admin-0.6.9 spec/models/sequel/division.rb
merb-admin-0.6.8 spec/models/sequel/division.rb
merb-admin-0.6.7 spec/models/sequel/division.rb
merb-admin-0.6.6 spec/models/sequel/division.rb
merb-admin-0.6.5 spec/models/sequel/division.rb
merb-admin-0.6.4 spec/models/sequel/division.rb
merb-admin-0.6.3 spec/models/sequel/division.rb
merb-admin-0.6.2 spec/models/sequel/division.rb