Implement function to calculate the difference in points

This commit is contained in:
Daniel Schädler 2019-06-14 18:02:47 +02:00
parent e8207c95c1
commit c5780c2da3
1 changed files with 4 additions and 0 deletions

View File

@ -3,4 +3,8 @@
class GroupScore < ApplicationRecord
belongs_to :team
belongs_to :group
def difference_in_points
scored_points - received_points
end
end