Implement function to calculate the difference in points
This commit is contained in:
parent
e8207c95c1
commit
c5780c2da3
|
|
@ -3,4 +3,8 @@
|
||||||
class GroupScore < ApplicationRecord
|
class GroupScore < ApplicationRecord
|
||||||
belongs_to :team
|
belongs_to :team
|
||||||
belongs_to :group
|
belongs_to :group
|
||||||
|
|
||||||
|
def difference_in_points
|
||||||
|
scored_points - received_points
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue