Class: TrackRelay::Current
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- TrackRelay::Current
- Defined in:
- lib/track_relay/current.rb
Overview
Per-request / per-job ambient context for track_relay.
Subclasses ActiveSupport::CurrentAttributes so the host application (or this gem's controller/job middleware) can stash request-scoped values that track reads back at event time without threading them through every call site.
All attributes are auto-reset between requests, jobs, and (in the
test suite) between tests via
ActiveSupport::CurrentAttributes::TestHelper, which is mixed into
ActiveSupport::TestCase in test/test_helper.rb.