mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: show tags in suggested topics list
This commit is contained in:
parent
1fd27bdbb3
commit
c63b0162e0
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue