Sha256: a18bb3878bd621b8a87bbcbd8a003d3a85628a5aaf2e7bfd38893cb31a17ca88
Contents?: true
Size: 597 Bytes
Versions: 33
Compression:
Stored size: 597 Bytes
Contents
class Player < ActiveRecord::Base has_one :article has_many :player_stats belongs_to :team has_one :injury_report def self.find_by_last_comma_first(full_name) tokens = full_name.split(',') Player.all(:conditions => ['last_name = ? and first_name = ?', tokens[0].strip, tokens[1].strip]) end def year_abbreviation() if self.eligibility.nil? "" elsif self.eligibility == "Freshman" "Fr" elsif self.eligibility == "Sophomore" "So" elsif self.eligibility == "Junior" "Jr" elsif self.eligibility == "Senior" "Sr" end end end
Version data entries
33 entries across 33 versions & 1 rubygems