mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Changed match callback to update instead of save
This commit is contained in:
@@ -4,7 +4,7 @@ class Match < ActiveRecord::Base
|
||||
belongs_to :mat, touch: true
|
||||
has_many :wrestlers, :through => :weight
|
||||
|
||||
after_save do
|
||||
after_update do
|
||||
if self.finished == 1 && self.winner_id != nil
|
||||
if self.w1 && self.w2
|
||||
wrestler1.touch
|
||||
|
||||
Reference in New Issue
Block a user