class SerialSerializer < ActiveModel::Serializer
  attributes :id, :title, :description, :thumbnail_url

  def thumbnail_url
    scope.image_url(object.thumbnail_url)
  end
end

class SerialSerializer < ActiveModel::Serializer
  attributes :id, :title, :description, :thumbnail_url
  meta do
    {
      posts_count: object.posts.published.count
    }
  end

  def thumbnail_url
    scope.image_url(object.thumbnail_url)
  end
end

Add posts_count as meta for serials page
Add posts_count as meta for serials page
