1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-07 14:57:48 +00:00

Add boutNumber to upcomgingMatches

This commit is contained in:
2015-03-12 15:18:06 -04:00
parent dc9639cf1c
commit e8dd332bbc
4 changed files with 24 additions and 15 deletions

View File

@@ -17,6 +17,7 @@ class Tournament < ActiveRecord::Base
self.weights.sort_by{|x|[x.max]}.each do |weight|
@upcomingMatches = weight.generateMatchups(@matches)
end
@upcomingMatches = assignBouts(@upcomingMatches)
return @upcomingMatches
end
@@ -40,9 +41,10 @@ class Tournament < ActiveRecord::Base
def assignBouts
def assignBouts(matches)
@bouts = Bout.new
@bouts.assignBouts(self.id)
@matches = @bouts.assignBouts(matches)
return @matches
end
end