diff --git a/app/models/question.rb b/app/models/question.rb index 85d24ad1..2c289a88 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -4,7 +4,7 @@ class Question < ApplicationRecord belongs_to :user, optional: true has_many :anonymous_blocks, dependent: :nullify has_many :answers, dependent: :destroy - has_many :inboxes, dependent: :destroy + has_many :inbox_entries, dependent: :destroy validates :content, length: { minimum: 1 } diff --git a/app/models/user.rb b/app/models/user.rb index d6aa0f85..50a88d2b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -33,7 +33,7 @@ class User < ApplicationRecord has_many :questions, dependent: :destroy_async has_many :answers, dependent: :destroy_async has_many :comments, dependent: :destroy_async - has_many :inboxes, dependent: :destroy_async + has_many :inbox_entries, dependent: :destroy_async has_many :smiles, class_name: "Reaction", dependent: :destroy_async has_many :notifications, foreign_key: :recipient_id, dependent: :destroy_async has_many :reports, dependent: :destroy_async