mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
work in progress wide category list
This commit is contained in:
@@ -6,6 +6,7 @@ class CategoryDetailedSerializer < ApplicationSerializer
|
||||
:text_color,
|
||||
:slug,
|
||||
:topic_count,
|
||||
:post_count,
|
||||
:topics_week,
|
||||
:topics_month,
|
||||
:topics_year,
|
||||
|
||||
@@ -19,6 +19,12 @@ class ListableTopicSerializer < BasicTopicSerializer
|
||||
:closed,
|
||||
:archived
|
||||
|
||||
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
|
||||
|
||||
def include_associations!
|
||||
include! :last_poster if object.include_last_poster
|
||||
end
|
||||
|
||||
def bumped
|
||||
object.created_at < object.bumped_at
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user