th: status: prevent recursion when serializing
parent
104cf929a5
commit
9107a290c1
|
@ -23,7 +23,6 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
belongs_to :reblog, serializer: REST::StatusSerializer
|
||||
belongs_to :application, if: :show_application?
|
||||
belongs_to :account, serializer: REST::AccountSerializer
|
||||
belongs_to :quote, serializer: REST::StatusSerializer
|
||||
|
||||
has_many :ordered_media_attachments, key: :media_attachments, serializer: REST::MediaAttachmentSerializer
|
||||
has_many :ordered_mentions, key: :mentions
|
||||
|
@ -185,3 +184,13 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
class REST::QuoteStatusSerializer < REST::StatusSerializer
|
||||
attribute :quote do
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
class REST::StatusSerializer < ActiveModel::Serializer
|
||||
belongs_to :quote, serializer: REST::QuoteStatusSerializer
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue