Sha256: e126f9cda7cddbff36a999a04f33be9251217be401cfa5eb09d326e8c6003625

Contents?: true

Size: 411 Bytes

Versions: 11

Compression:

Stored size: 411 Bytes

Contents

module Peek
  module ControllerHelpers
    extend ActiveSupport::Concern

    included do
      prepend_before_action :set_peek_request_id, if: :peek_enabled?
      helper_method :peek_enabled? if respond_to? :helper_method
    end

    protected

    def set_peek_request_id
      Peek.request_id = request.env['action_dispatch.request_id']
    end

    def peek_enabled?
      Peek.enabled?
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/peek-1.0.1/lib/peek/controller_helpers.rb
peek-1.0.1 lib/peek/controller_helpers.rb