页我有三个型号 class Comment < ActiveRecord::Base
belongs_to :commentable, :polymorphic => true
end
class Movie < ActiveRecord::Base
has_many :comments, :as => :commentable
end
class TV < Act
我不确定处理这种情况的最佳方法,并且会欣赏某些方向。基本上,我有一个场景,我需要为组织记录资产。 有多种类型的资产,因此属性的类型不同而不同类型但有共同的一些领域的所有资产,如: location
make
model
colour
purchase_date
warranty_period
类似: How to design a product table for many kin