Updated GroupSerializer for group_category
• Updated: - GroupSerializer for group_category
This commit is contained in:
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
|
||||
|
|
Loading…
Reference in New Issue