Module: Cased::Rails::ActiveJob

Extended by:
ActiveSupport::Concern
Defined in:
lib/cased/rails/active_job.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(job_data) ⇒ Object



25
26
27
28
29
# File 'lib/cased/rails/active_job.rb', line 25

def deserialize(job_data)
  super

  self.cased_context = (job_data['cased_context'] || {})
end

#serializeObject



31
32
33
# File 'lib/cased/rails/active_job.rb', line 31

def serialize
  super.merge('cased_context' => Cased::Context.current.context)
end