Sha256: 790b0d62824c1900b4e260635c5d2a126b2c6e46c74682f63fa3e9413f16aec8

Contents?: true

Size: 401 Bytes

Versions: 5

Compression:

Stored size: 401 Bytes

Contents

# frozen_string_literal: true

module Lcms
  module Engine
    module HeapNotifyable
      private

      def heap_notify(event)
        return if Heap.app_id.blank?
        return if current_user.nil?

        props = {
          access_code: current_user.access_code,
          email: current_user.email
        }.compact
        Heap.track event, current_user.id, props
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lcms-engine-0.1.4 app/controllers/concerns/lcms/engine/heap_notifyable.rb
lcms-engine-0.1.3 app/controllers/concerns/lcms/engine/heap_notifyable.rb
lcms-engine-0.2.0 app/controllers/concerns/lcms/engine/heap_notifyable.rb
lcms-engine-0.1.2 app/controllers/concerns/lcms/engine/heap_notifyable.rb
lcms-engine-0.1.0 app/controllers/concerns/lcms/engine/heap_notifyable.rb