Sha256: a2b63d7cb2cc53eeccda33908ea28383f4259dbf31f816e7b45e6f603518eaed
Contents?: true
Size: 587 Bytes
Versions: 5
Compression:
Stored size: 587 Bytes
Contents
require_dependency 'smklib/object_ext' module DebugSupport def self.append_features(base) super base.before_filter :initialize_timing, :check_local_request end def initialize_timing @time = Time.now end def local_request? #session['local_request'] == 1 consider_all_requests_local or session['local_request'] == 1 end def check_local_request val = params['local_request'].to_i default = consider_all_requests_local ? 1 : 0 session['local_request'] ||= default session['local_request'] = val if val.in? [1, 0] unless params['local_request'].nil? end end
Version data entries
5 entries across 5 versions & 1 rubygems