Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module AccessTokenable
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
has_one :access_token, as: :owner, dependent: :destroy
|
||||
has_one :access_token, as: :owner, dependent: :destroy_async
|
||||
after_create :create_access_token
|
||||
end
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ module Channelable
|
||||
included do
|
||||
validates :account_id, presence: true
|
||||
belongs_to :account
|
||||
has_one :inbox, as: :channel, dependent: :destroy
|
||||
has_one :inbox, as: :channel, dependent: :destroy_async
|
||||
end
|
||||
|
||||
def has_24_hour_messaging_window?
|
||||
|
||||
@@ -6,7 +6,7 @@ module OutOfOffisable
|
||||
OFFISABLE_ATTRS = %w[day_of_week closed_all_day open_hour open_minutes close_hour close_minutes].freeze
|
||||
|
||||
included do
|
||||
has_many :working_hours, dependent: :destroy
|
||||
has_many :working_hours, dependent: :destroy_async
|
||||
after_create :create_default_working_hours
|
||||
end
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ module Reportable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
has_many :events, dependent: :destroy
|
||||
has_many :events, dependent: :destroy_async
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user