Sha256: f7f7c071fa9b239f9976df440f4a7357ca9b2a508b31671e66caa37f7e90714a
Contents?: true
Size: 462 Bytes
Versions: 30
Compression:
Stored size: 462 Bytes
Contents
module SportDb::Models class Group < ActiveRecord::Base has_many :games, :order => 'pos' belongs_to :event has_many :group_teams, :class_name => 'GroupTeam' has_many :teams, :through => :group_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 Group end # module SportDb::Models
Version data entries
30 entries across 30 versions & 1 rubygems