Sha256: b212d1043844ff7a10336560da9f46cca389dc2eae044bb75d3ee4c80aed1a66
Contents?: true
Size: 716 Bytes
Versions: 16
Compression:
Stored size: 716 Bytes
Contents
class RaceRecord < ActiveRecord::Base has_site if respond_to? :has_site belongs_to :created_by, :class_name => 'User' belongs_to :updated_by, :class_name => 'User' belongs_to :race belongs_to :race_competitor belongs_to :race_category # these associations are only populated in the relatively rare case where the record is part of one of our result sets belongs_to :race_instance belongs_to :race_performance def elapsed_time if s = read_attribute(:elapsed_time) s.to_timecode else "" end end def elapsed_time=(time) write_attribute(:elapsed_time, time.seconds) if time # numbers will pass through unchanged. strings will be timecode-parsed end end
Version data entries
16 entries across 16 versions & 1 rubygems