From 6f4477fb2b887c2985669c190225f7e46351b701 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Sun, 30 Jun 2024 00:09:47 -0700 Subject: [PATCH] fix recursive quote foreign key --- app/models/status.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/status.rb b/app/models/status.rb index 9b05c8b45b9992..4ba87592e473d2 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -67,7 +67,7 @@ class Status < ApplicationRecord with_options class_name: 'Status', optional: true do belongs_to :thread, foreign_key: 'in_reply_to_id', inverse_of: :replies belongs_to :reblog, foreign_key: 'reblog_of_id', inverse_of: :reblogs - belongs_to :quote, inverse_of: :quote + belongs_to :quote, inverse_of: :quoted end has_many :favourites, inverse_of: :status, dependent: :destroy @@ -191,6 +191,7 @@ class Status < ApplicationRecord :conversation, :status_stat, :preloadable_poll, + preview_cards_status: [:preview_card], account: [:account_stat, :user], active_mentions: { account: :account_stat }, ]