KMontag42/sweetalert2-rails

Action executing even upon cancelling

gtibbitts opened this issue · 0 comments

Hi,
Thank you for this gem. The issue I'm having is this gem renders, however when I click cancel, the action is still executed. There is a pause when it executes, which is different than when I click yes as in that case the action executes right away. This is my code. Very basic.
= link_to 'Select Option', test_path, method: :post,class: 'btn', data: {confirm: "Are you sure you would like to change to #{option.name} plan?"}

Is there something else I need to change to prevent the action from executing?