Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
# frozen_string_literal: true
class UserPostBookmarkSerializer < UserPostTopicBookmarkBaseSerializer
attr_reader :post_id
def post_id
post.id
end
def linked_post_number
post.post_number
def deleted
topic.deleted_at.present? || post.deleted_at.present?
def hidden
post.hidden
def raw
post.raw
def cooked
post.cooked
def bookmarkable_user
@bookmarkable_user ||= post.user
# NOTE: In the UI there are special topic-status and topic-link components to
# display the topic URL, this is only used for certain routes like the .ics bookmarks.
def bookmarkable_url
post.full_url
private
def topic
post.topic
def post
object.bookmarkable