Sha256: 3f47184cc1095568fc68065d3facdc53231642c5a51713292fe71bd0d85fb7d9

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module SportDb
  module Model


class Group < ActiveRecord::Base

  has_many :matches, -> { order('pos') }, class_name: 'Match'

  belongs_to :event

  has_many :group_teams, class_name: 'GroupTeam'
  has_many :teams, :through => :group_teams

end # class Group


class GroupTeam < ActiveRecord::Base
  self.table_name = 'groups_teams'

  belongs_to :group
  belongs_to :team
end # class GroupTeam

  end # module Model
end # module SportDb

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sportdb-models-2.1.0 lib/sportdb/models/models/group.rb
sportdb-models-2.0.3 lib/sportdb/models/models/group.rb
sportdb-models-2.0.2 lib/sportdb/models/models/group.rb
sportdb-models-2.0.1 lib/sportdb/models/models/group.rb
sportdb-models-2.0.0 lib/sportdb/models/models/group.rb