haxney/railskating

View on GitHub
app/models/competition.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Competition < ActiveRecord::Base
  belongs_to :team
  has_many :events, -> { order(number: :asc) }, dependent: :destroy
  has_many :couples, -> { distinct }, through: :events
  has_many :levels, -> { distinct }, through: :events
  has_many :adjudicators, -> { order(shorthand: :asc) }, dependent: :destroy
end