From 47cd94e1ec26832aaefde159325634441e17de9f Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Wed, 5 Jun 2019 00:06:38 +0200 Subject: [PATCH] Combine two guard clauses into one --- app/models/match.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index db55459..64592c6 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -48,8 +48,7 @@ class Match < ApplicationRecord end def group_points_of(team) - return 0 unless finished? || in_progress? - return 0 unless teams.include?(team) + return 0 unless (finished? || in_progress?) && teams.include?(team) case current_leading_team when team