請幫助新手選擇在RoR3中實現繼承的最佳方式。我有:Ruby on Rails中的模型繼承3
-Person (address fields, birthdate, etc.) -Player, inherits from Person (position, shoe_size, etc.) -Goalkeeper, inherits from Player (other specific fields related to this role)
我認爲單表繼承是一個不好的解決方案,因爲在創建的表中會有很多空字段。做這個的最好方式是什麼?使用多態關聯(with has_one?)?使用belongs_to/has_one(但是如何在Player視圖中顯示Person的字段?)?不要實現繼承?其他方案?