From 7b9422fd6c8cbb300b0bd43c7a33090c348b6382 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Mon, 16 Mar 2015 08:13:41 -0400 Subject: [PATCH] Filter wrestlers per pool for matchups. --- app/models/pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/pool.rb b/app/models/pool.rb index 43a3b6e..c9c3f59 100644 --- a/app/models/pool.rb +++ b/app/models/pool.rb @@ -59,7 +59,7 @@ class Pool end def roundRobin(pool,tournament_id,weight,matches,wrestlers) - @wrestlers = wrestlers.to_a + @wrestlers = wrestlers.select{|w| w.poolNumber == pool}.to_a @poolMatches = RoundRobinTournament.schedule(@wrestlers).reverse @poolMatches.each_with_index do |b,index| @bout = b.map