FIX: show tags in suggested topics list

This commit is contained in:
Neil Lalonde 2016-07-05 15:00:09 -04:00
parent 1fd27bdbb3
commit c63b0162e0

View file

@ -7,10 +7,18 @@ class SuggestedTopicSerializer < ListableTopicSerializer
has_one :user, serializer: BasicUserSerializer, embed: :objects
end
attributes :archetype, :like_count, :views, :category_id
attributes :archetype, :like_count, :views, :category_id, :tags
has_many :posters, serializer: SuggestedPosterSerializer, embed: :objects
def posters
object.posters || []
end
def include_tags?
SiteSetting.tagging_enabled
end
def tags
object.tags.map(&:name)
end
end