chore: Remove account.destroy listener (#1530)

This commit is contained in:
Pranav Raj S
2020-12-19 18:11:43 +05:30
committed by GitHub
parent 090b716ec1
commit 8e2b4acc43
5 changed files with 13 additions and 33 deletions

View File

@@ -60,7 +60,6 @@ class Account < ApplicationRecord
enum locale: LANGUAGES_CONFIG.map { |key, val| [val[:iso_639_1_code], key] }.to_h
after_create_commit :notify_creation
after_destroy :notify_deletion
def agents
users.where(account_users: { role: :agent })
@@ -92,8 +91,4 @@ class Account < ApplicationRecord
def notify_creation
Rails.configuration.dispatcher.dispatch(ACCOUNT_CREATED, Time.zone.now, account: self)
end
def notify_deletion
Rails.configuration.dispatcher.dispatch(ACCOUNT_DESTROYED, Time.zone.now, account: self)
end
end