假设我有基类“Attachment < ActiveRecord::Base”和 2 个子类“Attachment::Video < Attachment”、“Attachment::Image < Attachment”。
present Attachment.all, with: API::Entities::AttachmentEntity
但我想为不同的子类使用不同的实体。Attachment::Video 应该与 API::Entities::AttachmentEntity::Video 等一起出现
葡萄可以吗?