Sha256: 7b996f3809d24ad31ff23d1448a2ff6badf5843f8d73f2b3dfad7981700a567c

Contents?: true

Size: 570 Bytes

Versions: 10

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

require 'global_registry_bindings/workers/push_entity_worker'

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

        included do
          after_commit :push_entity_to_global_registry_async, on: (global_registry_entity.push_on - %i[destroy])
        end

        def push_entity_to_global_registry_async
          ::GlobalRegistry::Bindings::Workers::PushEntityWorker.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/push_entity.rb
global-registry-bindings-0.1.8 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.7 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.6 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.5 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.4 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.3 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.2 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.1 lib/global_registry_bindings/model/push_entity.rb
global-registry-bindings-0.1.0 lib/global_registry_bindings/model/push_entity.rb