1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-06 06:28:33 +00:00

Added dataTables for matches and tournaments.

This commit is contained in:
2015-02-11 10:50:25 -05:00
parent f32b91def7
commit bdec6c0463
11 changed files with 28804 additions and 8 deletions

View File

@@ -1,11 +1,21 @@
class Match < ActiveRecord::Base
belongs_to :tournament
WIN_TYPES = ["Decision", "Major", "Tech Fall", "Pin", "Forfeit", "Injury Default", "Default", "DQ"]
attr_accessor :weight_max
attr_accessor :weight_max, :w1_name, :w1_name
def weight_max
@guy = Wrestler.find(self.r_id)
@weight = Weight.find(@guy.weight_id)
return @weight.max
end
def w1_name
return Wrestler.find(self.r_id).name
end
def w2_name
return Wrestler.find(self.g_id).name
end
end