triggers_subscriptions.rb 503 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module ChecklistTemplate::TriggersSubscriptions
  3. extend ActiveSupport::Concern
  4. included do
  5. after_commit :trigger_checklist_template_subscriptions
  6. end
  7. private
  8. def trigger_checklist_template_subscriptions
  9. Gql::Subscriptions::Checklist::TemplateUpdates.trigger(nil, arguments: { only_active: true })
  10. Gql::Subscriptions::Checklist::TemplateUpdates.trigger(nil, arguments: { only_active: false })
  11. end
  12. end