1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/models/wrestler.rb

16 lines
293 B
Ruby

class Wrestler < ActiveRecord::Base
belongs_to :school
belongs_to :weight
has_many :matches
def isWrestlingThisRound?(round)
@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
end
end
end