Sha256: f8fc55ffc0f0e3ec981e6d479e95d7d15c5ce8063943f715fe0a4308877a6609
Contents?: true
Size: 317 Bytes
Versions: 4
Compression:
Stored size: 317 Bytes
Contents
class Division < ActiveRecord::Base if Rails.version < '3.2' set_primary_key :custom_id else self.primary_key = :custom_id end belongs_to :league, foreign_key: 'custom_league_id' has_many :teams validates_numericality_of(:custom_league_id, only_integer: true) validates_presence_of(:name) end
Version data entries
4 entries across 4 versions & 1 rubygems