mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
23 lines
461 B
Ruby
23 lines
461 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
module ApplicationController::HandlesTransitions
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
around_action :handle_transaction
|
|
end
|
|
|
|
private
|
|
|
|
def handle_transaction
|
|
ApplicationHandleInfo.current = 'application_server'
|
|
PushMessages.init
|
|
|
|
yield
|
|
|
|
TransactionDispatcher.commit
|
|
PushMessages.finish
|
|
ensure
|
|
ApplicationHandleInfo.current = nil
|
|
end
|
|
end
|