Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249)

This commit is contained in:
Akhil G Krishnan
2021-11-18 10:32:29 +05:30
committed by GitHub
parent 4eeaadbd5b
commit b81a9f2010
23 changed files with 90 additions and 90 deletions

View File

@@ -82,8 +82,8 @@ class Message < ApplicationRecord
belongs_to :contact, required: false
belongs_to :sender, polymorphic: true, required: false
has_many :attachments, dependent: :destroy, autosave: true, before_add: :validate_attachments_limit
has_one :csat_survey_response, dependent: :destroy
has_many :attachments, dependent: :destroy_async, autosave: true, before_add: :validate_attachments_limit
has_one :csat_survey_response, dependent: :destroy_async
after_create_commit :execute_after_create_commit_callbacks