Sha256: 5e02497ddc62253aa1179c6aa932935d1fb26c4f471257921d1c595f6391bc75

Contents?: true

Size: 246 Bytes

Versions: 2

Compression:

Stored size: 246 Bytes

Contents

class Division < ActiveRecord::Base
  set_primary_key :custom_id
  validates_numericality_of(:custom_league_id, :only_integer => true)
  validates_presence_of(:name)

  belongs_to :league, :foreign_key => 'custom_league_id'
  has_many :teams
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
obitum-rails_admin-0.0.1 spec/dummy_app/app/models/division.rb
elucid-rails_admin-0.0.1 spec/dummy_app/app/models/division.rb