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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user