@ -15,7 +15,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
belongs_to :account , serializer : REST :: AccountSerializer
belongs_to :account , serializer : REST :: AccountSerializer
has_many :media_attachments , serializer : REST :: MediaAttachmentSerializer
has_many :media_attachments , serializer : REST :: MediaAttachmentSerializer
has_many :mentions
has_many :ordered_mentions , key : : mentions
has_many :tags
has_many :tags
has_many :emojis , serializer : REST :: CustomEmojiSerializer
has_many :emojis , serializer : REST :: CustomEmojiSerializer
@ -86,6 +86,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
%w( public unlisted ) . include? ( object . visibility )
%w( public unlisted ) . include? ( object . visibility )
end
end
def ordered_mentions
object . mentions . order ( :id )
end
class ApplicationSerializer < ActiveModel :: Serializer
class ApplicationSerializer < ActiveModel :: Serializer
attributes :name , :website
attributes :name , :website
end
end