Sha256: de5c525f7b0f6fa98c71173313f9bc68c3842f69176f55aab7b6c389ad2c9c1d
Contents?: true
Size: 574 Bytes
Versions: 8
Compression:
Stored size: 574 Bytes
Contents
module SportDB::Models class Event < ActiveRecord::Base belongs_to :league belongs_to :season has_many :rounds, :order => 'pos' # all (fix and flex) rounds has_many :games, :through => :rounds has_many :groups, :order => 'pos' has_many :event_teams, :class_name => 'EventTeam' has_many :teams, :through => :event_teams def add_teams_from_ary!( team_keys ) team_keys.each do |team_key| team = Team.find_by_key!( team_key ) self.teams << team end end end # class Event end # module SportDB::Models
Version data entries
8 entries across 8 versions & 1 rubygems