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