Chatwoot/app/models/application_record.rb
2020-08-06 15:21:06 +05:30

10 lines
272 B
Ruby

class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
DROPPABLES = %w[Account Channel Conversation Inbox User].freeze
def to_drop
return unless DROPPABLES.include?(self.class.name)
"#{self.class.name}Drop".constantize.new(self)
end
end