mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed wrestler.isWrestlingThisRound
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user