mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-12 00:09:32 +00:00
sorting before generating
This commit is contained in:
@@ -6,6 +6,7 @@ class Weight < ActiveRecord::Base
|
||||
|
||||
def generatePool
|
||||
@wrestlers = Wrestler.where(weight_id: self.id)
|
||||
@wrestlers.sort_by{|x|[x.original_seed]}
|
||||
if self.pools == 1
|
||||
@pool = Pool.new
|
||||
@pool.onePool(@wrestlers,self.id,self.tournament_id)
|
||||
|
||||
Reference in New Issue
Block a user