Sha256: 7f5435ebe5d05422cb8d89ce07bfb7ee5fe392f2b2cf9e9f3ef88e7947641196

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module SportDb
  module Model


class Stage < ActiveRecord::Base

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

  belongs_to :event

  has_many :stage_teams, class_name: 'StageTeam'
  has_many :teams, :through => :stage_teams

end # class Stage


class StageTeam < ActiveRecord::Base
  self.table_name = 'stages_teams'

  belongs_to :stage
  belongs_to :team
end # class StageTeam

  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/stage.rb
sportdb-models-2.0.3 lib/sportdb/models/models/stage.rb
sportdb-models-2.0.2 lib/sportdb/models/models/stage.rb
sportdb-models-2.0.1 lib/sportdb/models/models/stage.rb
sportdb-models-2.0.0 lib/sportdb/models/models/stage.rb