Class: ReviewableQueuedPostSerializer

Inherits:
ReviewableSerializer show all
Defined in:
app/serializers/reviewable_queued_post_serializer.rb

Instance Method Summary collapse

Methods inherited from ReviewableSerializer

#attributes, #bundled_actions, #can_edit, #claimed_by, create_attribute, #created_from_flag?, #editable_fields, #include_category_id?, #include_claimed_by?, #include_target_url?, #include_topic_id?, #include_topic_tags?, #include_topic_url?, payload_attributes, target_attributes, #target_created_by_trust_level, #target_url, #topic_tags, #topic_url

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#include_reply_to_post_number?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/serializers/reviewable_queued_post_serializer.rb', line 27

def include_reply_to_post_number?
  object.payload.present? && object.payload["reply_to_post_number"].present?
end

#reply_to_post_numberObject



23
24
25
# File 'app/serializers/reviewable_queued_post_serializer.rb', line 23

def reply_to_post_number
  object.payload["reply_to_post_number"].to_i
end