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

Calculate matchups for pools. This breaks generating matches.

This commit is contained in:
2015-03-12 15:03:38 -04:00
parent d68cebc6e4
commit dc9639cf1c
5 changed files with 73 additions and 21 deletions

26
app/models/matchup.rb Normal file
View File

@@ -0,0 +1,26 @@
class Matchup
attr_accessor :w1, :w2, :round, :weight_id
# def w1
# end
# def w2
# end
# def round
# end
# def weight_id
# end
def weight_max
@wrestler = Wrestler.find(self.w1)
@weight = Weight.find(@wrestler.weight_id)
return @weight.max
end
def w_name(id)
@wrestler = Wrestler.find(id)
return @wrestler.name
end
end