mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-11 08:11:38 +00:00
Create bracket views with upcomingMatches
This commit is contained in:
@@ -14,8 +14,9 @@ class Wrestler < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
def boutByRound(round)
|
||||
@match = matches_all.select{|m| m.round == round}.first
|
||||
def boutByRound(round,matches)
|
||||
@matches = matches.select{|m| m.w1 == self.id || m.w2 == self.id}
|
||||
@match = @matches.select{|m| m.round == round}.first
|
||||
if @match.blank?
|
||||
return "BYE"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user