Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
class Kbase::Category < ApplicationRecord
|
||||
belongs_to :account
|
||||
belongs_to :portal
|
||||
has_many :folders, dependent: :destroy
|
||||
has_many :folders, dependent: :destroy_async
|
||||
has_many :articles, dependent: :nullify
|
||||
|
||||
before_validation :ensure_account_id
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#
|
||||
class Kbase::Portal < ApplicationRecord
|
||||
belongs_to :account
|
||||
has_many :categories, dependent: :destroy
|
||||
has_many :categories, dependent: :destroy_async
|
||||
has_many :folders, through: :categories
|
||||
has_many :articles, dependent: :destroy
|
||||
has_many :articles, dependent: :destroy_async
|
||||
|
||||
validates :account_id, presence: true
|
||||
validates :name, presence: true
|
||||
|
||||
Reference in New Issue
Block a user