1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-11 07:56:28 +00:00

Got stuff working with matches being saved individually.

This commit is contained in:
2015-04-26 15:49:13 -04:00
parent 391e523b2e
commit dd44efa869
12 changed files with 97 additions and 128 deletions

View File

@@ -4,11 +4,23 @@ class Match < ActiveRecord::Base
def w1_name
Wrestler.find(self.w1).name
if self.w1
Wrestler.find(self.w1).name
else
self.loser1_name
end
end
def w2_name
Wrestler.find(self.w2).name
if self.w2
Wrestler.find(self.w2).name
else
self.loser2_name
end
end
def weight_max
Weight.find(self.weight_id).max
end
end