1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Mock advancment from pools to brackets

This commit is contained in:
2015-10-08 17:31:27 -04:00
parent b449aa530b
commit 516dbe66ad
6 changed files with 92 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ class Weight < ActiveRecord::Base
def poolRounds(matches)
@matchups = matches.select{|m| m.weight_id == self.id}
@poolMatches = @matchups.select{|m| m.bracket_position == nil}
@poolMatches = @matchups.select{|m| m.bracket_position == "Pool"}
return @poolMatches.sort_by{|m| m.round}.last.round
end
@@ -128,5 +128,9 @@ class Weight < ActiveRecord::Base
end
return @count
end
def poolOrder
@wrestlers = self.wrestlers
@wrestlers.sort_by{|w| w.poolWins}.reverse
end
end