Rename user/question associations to `:inbox_entries`
This commit is contained in:
parent
06b2421f2c
commit
ba7ba359b4
|
@ -4,7 +4,7 @@ class Question < ApplicationRecord
|
||||||
belongs_to :user, optional: true
|
belongs_to :user, optional: true
|
||||||
has_many :anonymous_blocks, dependent: :nullify
|
has_many :anonymous_blocks, dependent: :nullify
|
||||||
has_many :answers, dependent: :destroy
|
has_many :answers, dependent: :destroy
|
||||||
has_many :inboxes, dependent: :destroy
|
has_many :inbox_entries, dependent: :destroy
|
||||||
|
|
||||||
validates :content, length: { minimum: 1 }
|
validates :content, length: { minimum: 1 }
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class User < ApplicationRecord
|
||||||
has_many :questions, dependent: :destroy_async
|
has_many :questions, dependent: :destroy_async
|
||||||
has_many :answers, dependent: :destroy_async
|
has_many :answers, dependent: :destroy_async
|
||||||
has_many :comments, 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 :smiles, class_name: "Reaction", dependent: :destroy_async
|
||||||
has_many :notifications, foreign_key: :recipient_id, dependent: :destroy_async
|
has_many :notifications, foreign_key: :recipient_id, dependent: :destroy_async
|
||||||
has_many :reports, dependent: :destroy_async
|
has_many :reports, dependent: :destroy_async
|
||||||
|
|
Loading…
Reference in New Issue