about summary refs log tree commit diff
path: root/app/serializers/rest/status_edit_serializer.rb
blob: a1f9e824e26a42be36ecf12e9cba73a395976fbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class REST::StatusEditSerializer < ActiveModel::Serializer
  has_one :account, serializer: REST::AccountSerializer

  attributes :content, :spoiler_text,
             :media_attachments_changed, :created_at

  has_many :emojis, serializer: REST::CustomEmojiSerializer

  def content
    Formatter.instance.format(object)
  end
end