Closed kntmrkm closed 1 year ago
Hi, thanks for great gem.
Can't create Delayed::Job record aftererrors.addin model
Can't create Delayed::Job record after
in model
you can reproduce this repository https://github.com/kntmrkm/rails_delayed_job
if without below code errors.add(:base, 'error') . Delayed::Job record will create correctly.
errors.add(:base, 'error')
https://github.com/kntmrkm/rails_delayed_job/blob/caeb7a7cb0b26630f7019f3a9cef15ac27aa263d/app/models/book.rb#L7
This is the intended behavior. DJ loads a clean model copy from the database when running the job. It does not work with any instance state from where the job is queued.
Hi, thanks for great gem.
Can't create Delayed::Job record after
errors.addin model
you can reproduce this repository https://github.com/kntmrkm/rails_delayed_job
if without below code
errors.add(:base, 'error')
. Delayed::Job record will create correctly.https://github.com/kntmrkm/rails_delayed_job/blob/caeb7a7cb0b26630f7019f3a9cef15ac27aa263d/app/models/book.rb#L7