mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:50:14 +08:00
988a175e94
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
22 lines
390 B
Ruby
22 lines
390 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BasicReviewableFlaggedPostSerializer < BasicReviewableSerializer
|
|
attributes :post_number, :topic_fancy_title
|
|
|
|
def post_number
|
|
object.post.post_number
|
|
end
|
|
|
|
def topic_fancy_title
|
|
object.topic.fancy_title
|
|
end
|
|
|
|
def include_post_number?
|
|
object.post.present?
|
|
end
|
|
|
|
def include_topic_fancy_title?
|
|
object.topic.present?
|
|
end
|
|
end
|