14 lines
361 B
Ruby
14 lines
361 B
Ruby
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
module ChecksLatestChangeObserved
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
after_commit :latest_change_set_from_observer
|
|
end
|
|
|
|
def latest_change_set_from_observer
|
|
latest_change = destroyed? ? nil : updated_at
|
|
self.class.latest_change_set(latest_change)
|
|
end
|
|
end
|