Sha256: 1c5f281b22136b4af9ae15308ab0289bcfe7c29f27957bcda7c10983bb9f3132
Contents?: true
Size: 242 Bytes
Versions: 8
Compression:
Stored size: 242 Bytes
Contents
class League < ActiveRecord::Base validates_presence_of(:name) has_many :divisions, :foreign_key => 'custom_league_id' has_many :teams, :through => :divisions, :readonly => true def custom_name "League '#{self.name}'" end end
Version data entries
8 entries across 8 versions & 4 rubygems