From eb56b9d16ca13545786cd71c0195db5a9c37594c Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Mon, 9 Jan 2023 19:19:30 -0500 Subject: [PATCH] Clear the cache of wrestlers when next matches are assigned to a mat --- app/models/mat.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/mat.rb b/app/models/mat.rb index b557f43..c6f139f 100644 --- a/app/models/mat.rb +++ b/app/models/mat.rb @@ -26,6 +26,12 @@ class Mat < ActiveRecord::Base match = t_matches.sort_by{|m| m.bout_number}.first match.mat_id = self.id if match.save + if match.w1 + match.wrestler1.touch + end + if match.w2 + match.wrestler2.touch + end return true else return false