Updated GroupSerializer for group_category

• Updated:
- GroupSerializer for group_category
This commit is contained in:
mgabdev 2020-09-10 17:14:00 -05:00
parent 6e17b7c17b
commit eba6696ad5

@ -4,14 +4,16 @@ class REST::GroupSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :id, :title, :description, :description_html, :cover_image_url, :is_archived,
:member_count, :created_at, :is_private, :is_visible, :slug, :tags, :category
:member_count, :created_at, :is_private, :is_visible, :slug, :tags, :group_category
def id
object.id.to_s
end
def category
object.group_categories_id
def group_category
if object.group_categories
object.group_categories
end
end
def description