From 8ef1c309e07cf3a51e97d89caa8e621f23a1690f Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 10 Dec 2023 21:59:50 +0200 Subject: [PATCH] fix email messages user assoc --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index e026610b7..af0ecf314 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -55,7 +55,7 @@ class User < ApplicationRecord has_many :template_folders, dependent: :destroy, foreign_key: :author_id, inverse_of: :author has_many :user_configs, dependent: :destroy has_many :encrypted_configs, dependent: :destroy, class_name: 'EncryptedUserConfig' - has_many :email_messages, dependent: :destroy + has_many :email_messages, dependent: :destroy, foreign_key: :author_id, inverse_of: :author devise :two_factor_authenticatable, :recoverable, :rememberable, :validatable, :trackable