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
|
include RoutingHelper
|
||||||
|
|
||||||
attributes :id, :title, :description, :description_html, :cover_image_url, :is_archived,
|
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
|
def id
|
||||||
object.id.to_s
|
object.id.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def category
|
def group_category
|
||||||
object.group_categories_id
|
if object.group_categories
|
||||||
|
object.group_categories
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def description
|
def description
|
||||||
|
Loading…
x
Reference in New Issue
Block a user