Sha256: 0405ba55504926e3b52690be862d35057eff95aa63b421cc28f3fca58fd06084
Contents?: true
Size: 629 Bytes
Versions: 66
Compression:
Stored size: 629 Bytes
Contents
# encoding: utf-8 module WorldDb module Model class City has_many :teams, class_name: 'SportDb::Model::Team', foreign_key: 'city_id' # fix: require active record 4 # has_many :clubs, -> { where club: true }, class_name: 'SportDb::Model::Team', foreign_key: 'city_id' # has_many :national_teams, -> { where club: false }, class_name: 'SportDb::Model::Team', foreign_key: 'city_id' has_many :grounds, class_name: 'SportDb::Model::Ground', foreign_key: 'city_id' has_many :games, :through => :grounds end end # module Model end # module WorldDb
Version data entries
66 entries across 66 versions & 2 rubygems