Rename user/question associations to `:inbox_entries`

This commit is contained in:
Andreas Nedbal 2024-01-27 13:03:45 +01:00 committed by Andreas Nedbal
parent 06b2421f2c
commit ba7ba359b4
2 changed files with 2 additions and 2 deletions

View File

@ -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 }

View File

@ -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