2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
class ReviewableFlaggedPostSerializer < ReviewableSerializer
|
2019-06-05 12:12:13 -04:00
|
|
|
target_attributes :cooked, :raw, :reply_count, :reply_to_post_number
|
2019-05-03 16:36:37 -04:00
|
|
|
attributes :blank_post, :post_updated_at, :post_version
|
|
|
|
|
|
|
|
def post_version
|
|
|
|
object.target&.version
|
|
|
|
end
|
2019-05-03 09:42:43 -04:00
|
|
|
|
|
|
|
def post_updated_at
|
|
|
|
object.target&.updated_at
|
|
|
|
end
|
2019-04-17 16:14:36 -04:00
|
|
|
|
|
|
|
def blank_post
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def include_blank_post?
|
|
|
|
object.target.blank?
|
|
|
|
end
|
2019-01-03 12:03:01 -05:00
|
|
|
end
|