gab-social/app/serializers/rest/group_serializer.rb
2019-07-02 03:10:25 -04:00

16 lines
294 B
Ruby

# 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