Skip to content

Commit

Permalink
Revert to using morph instead of cable_ready
Browse files Browse the repository at this point in the history
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:
stimulusreflex/stimulus_reflex#314 (comment)
  • Loading branch information
rioug committed Sep 25, 2023
1 parent 986be46 commit 8e64fa5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/reflexes/admin/orders_reflex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ def capture
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] = with_locale{
payment_capture.gateway_error || I18n.t(:payment_processing_failed)
Expand Down

0 comments on commit 8e64fa5

Please sign in to comment.