1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +00:00

Fixed wrestler.isWrestlingThisRound

This commit is contained in:
2015-01-30 15:43:41 -05:00
parent ae4b2718b5
commit ba8ce0b73a

View File

@@ -4,9 +4,9 @@ class Wrestler < ActiveRecord::Base
has_many :matches
def isWrestlingThisRound?(round)
@r_id = Match.where(r_id: self.id, round: round)
@g_id = Match.where(g_id: self.id, round: round)
if @r_id or @g_id
@r = Match.where(r_id: self.id, round: round)
@g = Match.where(g_id: self.id, round: round)
if @r or @g
return true
else
return false