Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master

This commit is contained in:
Jenkins
2018-03-19 20:17:18 +00:00
22 changed files with 134 additions and 77 deletions

View File

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