mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:33:45 +08:00
a5d9afe397
Also includes a refactor to TopicView's serializer which was not building our attributes using serializers properly.
13 lines
220 B
Ruby
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
|