diff --git a/lib/active_interaction/extras/current.rb b/lib/active_interaction/extras/current.rb index 2d2ca54..ab8a366 100644 --- a/lib/active_interaction/extras/current.rb +++ b/lib/active_interaction/extras/current.rb @@ -5,6 +5,10 @@ class CurrentContext < ActiveSupport::CurrentAttributes attribute :job attribute :batch_event attribute :batch + + def batch + super || job&.batch + end end def current