mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed depricated callback
This commit is contained in:
@@ -3,8 +3,8 @@ class Match < ActiveRecord::Base
|
|||||||
belongs_to :weight, touch: true
|
belongs_to :weight, touch: true
|
||||||
belongs_to :mat, touch: true
|
belongs_to :mat, touch: true
|
||||||
has_many :wrestlers, :through => :weight
|
has_many :wrestlers, :through => :weight
|
||||||
after_update :after_finished_actions, :if => :finished_changed?
|
after_update :after_finished_actions, :if => :saved_change_to_finished?
|
||||||
after_update :after_finished_actions, :if => :winner_id_changed?
|
after_update :after_finished_actions, :if => :saved_change_to_winner_id?
|
||||||
|
|
||||||
def after_finished_actions
|
def after_finished_actions
|
||||||
if self.finished == 1 && self.winner_id != nil
|
if self.finished == 1 && self.winner_id != nil
|
||||||
|
|||||||
Reference in New Issue
Block a user