Sha256: b25ff98d6dee502a9ddf673c2694dacfda9ca6a93dce58ffadb12aec031aab72
Contents?: true
Size: 785 Bytes
Versions: 1
Compression:
Stored size: 785 Bytes
Contents
# encoding: utf-8 module SportDb module Model class EventStanding < ActiveRecord::Base self.table_name = 'event_standings' has_many :entries, class_name: 'SportDb::Model::EventStandingEntry', foreign_key: 'event_standing_id', :dependent => :delete_all belongs_to :event end # class EventStanding class EventStandingEntry < ActiveRecord::Base self.table_name = 'event_standing_entries' belongs_to :standing, class_name: 'SportDb::Model::EventStanding', foreign_key: 'event_standing_id' belongs_to :team ## note: ## map standing_id to group_standing_id - convenience alias def standing_id=(value) write_attribute(:event_standing_id, value); end end # class EventStandingEntry end # module Model end # module SportDb
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sportdb-models-2.0.3 | lib/sportdb/models/models/stats/event_standing.rb |