mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-08 07:22:38 +00:00
Clear the cache of wrestlers when next matches are assigned to a mat
This commit is contained in:
@@ -26,6 +26,12 @@ class Mat < ActiveRecord::Base
|
|||||||
match = t_matches.sort_by{|m| m.bout_number}.first
|
match = t_matches.sort_by{|m| m.bout_number}.first
|
||||||
match.mat_id = self.id
|
match.mat_id = self.id
|
||||||
if match.save
|
if match.save
|
||||||
|
if match.w1
|
||||||
|
match.wrestler1.touch
|
||||||
|
end
|
||||||
|
if match.w2
|
||||||
|
match.wrestler2.touch
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user