7

Let's say i have Base class "Attachment < ActiveRecord::Base" and 2 child classes "Attachment::Video < Attachment" , "Attachment::Image < Attachment".

present Attachment.all, with: API::Entities::AttachmentEntity

But i want to use different entities for different subclasses. Attachment::Video should be present with API::Entities::AttachmentEntity::Video and so on

Is it possible in grape ?

Yegor Razumovsky
  • 902
  • 2
  • 9
  • 26

0 Answers0