1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-05 22:21:26 +00:00

Updating views

This commit is contained in:
2015-11-18 13:11:47 +00:00
parent 67727c6391
commit 0ba25da89a
5 changed files with 18 additions and 6 deletions

View File

@@ -5,9 +5,18 @@ class School < ActiveRecord::Base
#calculate score here
def pageScore
if self.score == nil
return 0.0
else
return self.score
end
end
def calcScore
totalWrestlerPoints - totalDeductedPoints
newScore = totalWrestlerPoints - totalDeductedPoints
self.score = newScore
self.save
end
def totalWrestlerPoints