discourse/app/serializers/topic_pending_post_serializer.rb
Robin Ward a5d9afe397 FEATURE: Include a user's pending posts in the topic view
Also includes a refactor to TopicView's serializer which was not
building our attributes using serializers properly.
2019-04-12 14:25:12 -04:00

13 lines
220 B
Ruby

class TopicPendingPostSerializer < ApplicationSerializer
attributes :id, :raw, :created_at
def raw
object.payload['raw']
end
def include_raw?
object.payload && object.payload['raw'].present?
end
end