We've moved discussions to Discord

Is the new Hotwire scaffolding code causing errors for Sidekiq?

Aska Konomi
With the new scaffold structure, all scaffolded models come with the following code:
# Broadcast changes in realtime with Hotwire
after_create_commit  -> { broadcast_prepend_later_to :items, partial: "items/index", locals: { item: self } }
after_update_commit  -> { broadcast_replace_later_to self }
after_destroy_commit -> { broadcast_remove_to :items, target: dom_id(self, :index) }
But it seems this will cause Sidekiq jobs to fail with the following error:

スクリーンショット 2022-01-04 13.13.59.png 43 KB


This was a simple update (edit) action. Is there any way to prevent this, other than remove the code?
Notifications
You’re not receiving notifications from this thread.