Sha256: ad8b79898e65e4ddd37cea0a320403ced2c22b743cbe0b505493e8678becee98

Contents?: true

Size: 668 Bytes

Versions: 10

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

require 'global_registry_bindings/workers/pull_mdm_id_worker'

module GlobalRegistry #:nodoc:
  module Bindings #:nodoc:
    module Model #:nodoc:
      module PullMdm
        extend ActiveSupport::Concern

        included do
          GlobalRegistry::Bindings::Workers.mdm_worker_class(self)
          after_commit :pull_mdm_id_from_global_registry_async, on: %i[create update]
        end

        def pull_mdm_id_from_global_registry_async
          "::GlobalRegistry::Bindings::Workers::#{global_registry_entity.mdm_worker_class_name}"
            .constantize .perform_async(self.class, id)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
global-registry-bindings-0.1.9 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.8 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.7 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.6 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.5 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.4 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.3 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.2 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.1 lib/global_registry_bindings/model/pull_mdm.rb
global-registry-bindings-0.1.0 lib/global_registry_bindings/model/pull_mdm.rb