Sha256: 28ff304c2b3827da03086e6daf4022cfd7151056cbfc06a6d689a937ddd9062e
Contents?: true
Size: 1015 Bytes
Versions: 49
Compression:
Stored size: 1015 Bytes
Contents
# frozen_string_literal: true module LHS class Railtie < Rails::Railtie initializer "lhs.hook_into_controller_initialization" do class ActionController::Base def initialize prepare_lhs_request_cycle_cache reset_option_blocks reset_extended_rollbar_request_logs super end private def prepare_lhs_request_cycle_cache return unless LHS.config.request_cycle_cache_enabled LHS::Interceptors::RequestCycleCache::ThreadRegistry.request_id = [Time.now.to_f, request.object_id].join('#') end def reset_option_blocks LHS::OptionBlocks::CurrentOptionBlock.options = nil end def reset_extended_rollbar_request_logs return unless defined?(::Rollbar) return unless LHC.config.interceptors.include?(LHS::Interceptors::ExtendedRollbar::Interceptor) LHS::Interceptors::ExtendedRollbar::ThreadRegistry.log = [] end end end end end
Version data entries
49 entries across 49 versions & 1 rubygems