jjzjj

hicSourceError

全部标签

ruby - ActiveRecord::HasManyThroughAssociationPolymorphicSourceError

我需要一个玩家有很多结构和属于玩家的结构。结构是一种多态关系。classPlayerplayer_structuresendclassPlayerStructures:structurehas_one:player,:through=>:player_structureendclassStructureB:structurehas_one:player,:through=>:player_structureend但是如果我拉出Player.first并询问它的结构,它会给出:ActiveRecord::HasManyThroughAssociationPolymorphicSource