class ProductSerializer < Qwaiter::Serializer embed :ids, include: true attributes :name, :price, :description, :image def image if object.image.present? {small: object.image.url(:small)} else nil end end end