about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-03-28 04:44:59 +0100
committerGitHub <noreply@github.com>2019-03-28 04:44:59 +0100
commitf1bc90ab508cbdebc646324f87db48a9e80036f4 (patch)
treec9e6fff16d8e69ed99e7010cabd4d83d595e5493 /app/serializers/rest
parentf46f67d984e4e2deb4bf98cd5c5de813caf66eca (diff)
Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)
Also, fix some n+1 queries

Resolve #10365
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/status_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb
index 30edf397b..106777b6e 100644
--- a/app/serializers/rest/status_serializer.rb
+++ b/app/serializers/rest/status_serializer.rb
@@ -21,7 +21,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
   has_many :emojis, serializer: REST::CustomEmojiSerializer
 
   has_one :preview_card, key: :card, serializer: REST::PreviewCardSerializer
-  has_one :poll, serializer: REST::PollSerializer
+  has_one :preloadable_poll, key: :poll, serializer: REST::PollSerializer
 
   def id
     object.id.to_s