FIX: /categories page on mobile

This commit is contained in:
Régis Hanol
2016-08-19 01:47:00 +02:00
parent 7195a103ab
commit eb953c0904
8 changed files with 201 additions and 72 deletions

View File

@@ -10,6 +10,12 @@ class CategoryDetailedSerializer < BasicCategorySerializer
:is_uncategorized,
:subcategory_ids
has_many :displayable_topics, serializer: ListableTopicSerializer, embed: :objects, key: :topics
def include_displayable_topics?
displayable_topics.present?
end
def is_uncategorized
object.id == SiteSetting.uncategorized_category_id
end