Sha256: 0a9d28ef1a48f8c1edc43db72ef013b1bfbb0ca9336af15321f0d23b451202be
Contents?: true
Size: 789 Bytes
Versions: 5
Compression:
Stored size: 789 Bytes
Contents
# encoding: utf-8 module SportDb module Model class AlltimeStanding < ActiveRecord::Base self.table_name = 'alltime_standings' has_many :entries, class_name: 'SportDb::Model::AlltimeStandingEntry', foreign_key: 'alltime_standing_id', :dependent => :delete_all end # class AlltimeStanding class AlltimeStandingEntry < ActiveRecord::Base self.table_name = 'alltime_standing_entries' belongs_to :standing, class_name: 'SportDb::Model::AlltimeStanding', foreign_key: 'alltime_standing_id' belongs_to :team ## note: ## map standing_id to alltime_standing_id - convenience alias def standing_id=(value) write_attribute(:alltime_standing_id, value); end end # class AlltimeStandingEntry end # module Model end # module SportDb
Version data entries
5 entries across 5 versions & 1 rubygems