app/models/match.rb
# Since ladders are broken anyway, they are not handled here
Since ladders are broken anyway, they are not handled here
Since ladders are broken anyway they are not handled here
def reset_contest
    return if score1_was.nil? || score2_was.nil?
    return if contest.contest_type == Contest::TYPE_LEAGUE &&
              !contester2.active || !contester1.active
    if score1_was == score2_was
      contester1.draw = contester1.draw - 1
      contester2.draw = contester2.draw - 1
    elsif score1_was > score2_was
      contester1.win = contester1.win - 1
      contester2.loss = contester2.loss - 1
    elsif score1_was < score2_was
      contester1.loss = contester1.loss - 1
      contester2.win = contester2.win - 1
    end
    unless contest.contest_type == Contest::TYPE_BRACKET
      contester1.score = contester1.score - score1_was
      contester2.score = contester2.score - score2_was
      contester1.save!
      contester2.save!
    end
  end
def reset_contest return if score1_was . nil? || score2_was . nil? return if contest . contest_type == Contest :: TYPE_LEAGUE && ! contester2 . active || ! contester1 . active if score1_was == score2_was contester1 . draw = contester1 . draw - 1 contester2 . draw = contester2 . draw - 1 elsif score1_was > score2_was contester1 . win = contester1 . win - 1 contester2 . loss = contester2 . loss - 1 elsif score1_was < score2_was contester1 . loss = contester1 . loss - 1 contester2 . win = contester2 . win - 1 end unless contest . contest_type == Contest :: TYPE_BRACKET contester1 . score = contester1 . score - score1_was contester2 . score = contester2 . score - score2_was contester1 . save! contester2 . save! end end
Since ladders are broken anyway, they are not handled here
Since ladders are broken anyway they are not handled here