From 37c106fb069ccb535d841c1d5d0d2e01a1acbcf6 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 12:55:23 +0000 Subject: [PATCH] Fixed depricated callback --- app/models/match.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index 711c680..ac3bc7c 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -3,8 +3,8 @@ class Match < ActiveRecord::Base belongs_to :weight, touch: true belongs_to :mat, touch: true has_many :wrestlers, :through => :weight - after_update :after_finished_actions, :if => :finished_changed? - after_update :after_finished_actions, :if => :winner_id_changed? + after_update :after_finished_actions, :if => :saved_change_to_finished? + after_update :after_finished_actions, :if => :saved_change_to_winner_id? def after_finished_actions if self.finished == 1 && self.winner_id != nil