From 8359deca4c980ab51146830b11b9c1edad1a36b7 Mon Sep 17 00:00:00 2001 From: Anton Katunin Date: Wed, 31 Jul 2024 15:46:29 +1000 Subject: [PATCH] Fix batch --- lib/active_interaction/extras/current.rb | 4 ++++ 1 file changed, 4 insertions(+) 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