Class: PendingPostSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/pending_post_serializer.rb

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#created_by_idObject



20
21
22
# File 'app/serializers/pending_post_serializer.rb', line 20

def created_by_id
  object.target_created_by_id
end

#raw_textObject



24
25
26
# File 'app/serializers/pending_post_serializer.rb', line 24

def raw_text
  payload["raw"]
end

#titleObject



28
29
30
# File 'app/serializers/pending_post_serializer.rb', line 28

def title
  payload["title"] || topic&.title
end