From 7bb14aca1a6881e37c4bc6c1bd89fc2f126386db Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 22 Apr 2014 18:33:41 -0400 Subject: fix paren thing --- lib/scheduling/elimination.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/scheduling') diff --git a/lib/scheduling/elimination.rb b/lib/scheduling/elimination.rb index 5ce71ca..055fdbd 100644 --- a/lib/scheduling/elimination.rb +++ b/lib/scheduling/elimination.rb @@ -92,7 +92,7 @@ STRING end str += "/>\n" - color = matches[i].teams.first and matches[i].teams.first.users.include?(current_user) ? "#BCED91" : "white" + color = (matches[i].teams[0] and matches[i].teams[0].users.include?(current_user)) ? "#BCED91" : "white" str += "\t\t\n" if matches[i].teams.first str += "\t\tTeam #{matches[i].teams.first.id}\n" @@ -100,7 +100,7 @@ STRING str += "\t\t VS \n" - color = matches[i].teams[1] and matches[i].teams[1].users.include?(current_user) ? "#BCED91" : "white" + color = (matches[i].teams[1] and matches[i].teams[1].users.include?(current_user)) ? "#BCED91" : "white" str += "\t\t\n" if matches[i].teams[1] str += "\t\tTeam #{matches[i].teams[1].id}\n" -- cgit v1.2.3-2-g168b