1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Clear the cache of wrestlers when next matches are assigned to a mat

This commit is contained in:
2023-01-09 19:19:30 -05:00
parent 6b57246080
commit eb56b9d16c

View File

@@ -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