Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
13
research/chatwoot/app/models/concerns/channelable.rb
Normal file
13
research/chatwoot/app/models/concerns/channelable.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Channelable
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
validates :account_id, presence: true
|
||||
belongs_to :account
|
||||
has_one :inbox, as: :channel, dependent: :destroy_async, touch: true
|
||||
after_update :create_audit_log_entry
|
||||
end
|
||||
|
||||
def create_audit_log_entry; end
|
||||
end
|
||||
|
||||
Channelable.prepend_mod_with('Channelable')
|
||||
Reference in New Issue
Block a user