group_serializer.rb 294 Bytes
Newer Older
Rob Colbert's avatar
Rob Colbert committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# frozen_string_literal: true

class REST::GroupSerializer < ActiveModel::Serializer
  include RoutingHelper
  
  attributes :id, :title, :description, :cover_image_url, :is_archived

  def id
    object.id.to_s
  end

  def cover_image_url
    full_asset_url(object.cover_image.url)
  end
end