Sha256: 343c4cf505ee812946e7691933675f78524b1ce9f92cf3027a8761103f7a2cde

Contents?: true

Size: 619 Bytes

Versions: 6

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

require 'global_registry_bindings/workers/delete_gr_entity_worker'

module GlobalRegistry #:nodoc:
  module Bindings #:nodoc:
    module Entity #:nodoc:
      module DeleteEntityMethods
        extend ActiveSupport::Concern

        included do
          after_commit :delete_entity_from_global_registry_async, on: :destroy
        end

        def delete_entity_from_global_registry_async
          return unless global_registry.id_value?
          ::GlobalRegistry::Bindings::Workers::DeleteGrEntityWorker.perform_async(global_registry.id_value)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
global-registry-bindings-0.0.6 lib/global_registry_bindings/entity/delete_entity_methods.rb
global-registry-bindings-0.0.5 lib/global_registry_bindings/entity/delete_entity_methods.rb
global-registry-bindings-0.0.4 lib/global_registry_bindings/entity/delete_entity_methods.rb
global-registry-bindings-0.0.3 lib/global_registry_bindings/entity/delete_entity_methods.rb
global-registry-bindings-0.0.2 lib/global_registry_bindings/entity/delete_entity_methods.rb
global-registry-bindings-0.0.1 lib/global_registry_bindings/entity/delete_entity_methods.rb