mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-04 13:43:48 +00:00
Destroy matches if a school wrestler or weight is destroyed
This commit is contained in:
@@ -6,6 +6,10 @@ class School < ActiveRecord::Base
|
||||
|
||||
validates :name, presence: true
|
||||
|
||||
before_destroy do
|
||||
self.tournament.destroyAllMatches
|
||||
end
|
||||
|
||||
#calculate score here
|
||||
def pageScore
|
||||
if self.score == nil
|
||||
|
||||
Reference in New Issue
Block a user