trabajo-afectivo/app/models/concerns/has_karma_activity_log.rb

24 lines
455 B
Ruby
Raw Permalink Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
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)
true
2017-05-05 09:16:47 +00:00
end
end