diff --git a/app/serializers/topic_view_wordpress_serializer.rb b/app/serializers/topic_view_wordpress_serializer.rb index d7274d5a4b6..b4e76103190 100644 --- a/app/serializers/topic_view_wordpress_serializer.rb +++ b/app/serializers/topic_view_wordpress_serializer.rb @@ -4,6 +4,7 @@ class TopicViewWordpressSerializer < ApplicationSerializer # These attributes will be delegated to the topic attributes :id, + :category_id, :posts_count, :filtered_posts_count, :posts @@ -15,6 +16,10 @@ class TopicViewWordpressSerializer < ApplicationSerializer object.topic.id end + def category_id + object.topic.category_id + end + def posts_count object.topic.posts_count end