Combine two guard clauses into one
This commit is contained in:
parent
aa1bb63038
commit
47cd94e1ec
|
|
@ -48,8 +48,7 @@ class Match < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def group_points_of(team)
|
def group_points_of(team)
|
||||||
return 0 unless finished? || in_progress?
|
return 0 unless (finished? || in_progress?) && teams.include?(team)
|
||||||
return 0 unless teams.include?(team)
|
|
||||||
|
|
||||||
case current_leading_team
|
case current_leading_team
|
||||||
when team
|
when team
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue