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:
26
app/models/matchup.rb
Normal file
26
app/models/matchup.rb
Normal 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
|
||||
Reference in New Issue
Block a user