mirror of
https://ghfast.top/https://github.com/discourse/discourse-follow.git
synced 2026-07-16 11:46:25 +08:00
This commit adds a nav item under the Activity tab in user profile to show a feed of posts made by followed users.
22 lines
411 B
Ruby
22 lines
411 B
Ruby
# frozen_string_literal: true
|
|
|
|
class FollowPostSerializer < ApplicationSerializer
|
|
include PostItemExcerpt
|
|
|
|
attributes *%i(
|
|
category_id
|
|
created_at
|
|
id
|
|
post_number
|
|
post_type
|
|
topic_id
|
|
url
|
|
)
|
|
|
|
has_one :user, serializer: BasicUserSerializer, embed: :object
|
|
has_one :topic, serializer: BasicTopicSerializer, embed: :object
|
|
|
|
def category_id
|
|
object.topic.category_id
|
|
end
|
|
end
|