2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-05-05 09:16:47 +00:00
|
|
|
module HasKarmaActivityLog
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
before_destroy :karma_activity_log_destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
=begin
|
|
|
|
|
|
|
|
delete object online notification list, will be executed automatically
|
|
|
|
|
|
|
|
model = Model.find(123)
|
|
|
|
model.karma_activity_log_destroy
|
|
|
|
|
|
|
|
=end
|
|
|
|
|
|
|
|
def karma_activity_log_destroy
|
|
|
|
Karma::ActivityLog.remove(self.class.to_s, id)
|
2017-06-16 22:53:20 +00:00
|
|
|
true
|
2017-05-05 09:16:47 +00:00
|
|
|
end
|
|
|
|
end
|