Class: TopicPendingPostSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/topic_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

#include_raw?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/serializers/topic_pending_post_serializer.rb', line 10

def include_raw?
  object.payload && object.payload["raw"].present?
end

#rawObject



6
7
8
# File 'app/serializers/topic_pending_post_serializer.rb', line 6

def raw
  object.payload["raw"]
end