Revert to using morph instead of cable_ready

The issue is with with the stimilus tooltip controller, it add some
element to the DOM which create issue when it's modified by
StimulusReflex. See here for a more detailed explanation:
https://github.com/stimulusreflex/stimulus_reflex/issues/314#issuecomment-702479357
This commit is contained in:
Gaetan Craig-Riou
2023-09-25 13:42:35 +02:00
parent 3525320590
commit 31c537c5e0

View File

@@ -8,13 +8,8 @@ module Admin
payment_capture = OrderCaptureService.new(@order)
if payment_capture.call
cable_ready.inner_html(
selector: dom_id(@order),
html: render(partial: "spree/admin/orders/table_row",
locals: { order: @order.reload, success: true })
).broadcast
morph :nothing
morph dom_id(@order), render(partial: "spree/admin/orders/table_row",
locals: { order: @order.reload, success: true })
else
flash[:error] = payment_capture.gateway_error || I18n.t(:payment_processing_failed)
morph_admin_flashes