From c63b0162e0282f0d7c4083b66466b0c2d4a05060 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 5 Jul 2016 15:00:09 -0400 Subject: [PATCH] FIX: show tags in suggested topics list --- app/serializers/suggested_topic_serializer.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/serializers/suggested_topic_serializer.rb b/app/serializers/suggested_topic_serializer.rb index bb09ac870..3d4b8f380 100644 --- a/app/serializers/suggested_topic_serializer.rb +++ b/app/serializers/suggested_topic_serializer.rb @@ -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