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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user