javascript - Rails link_to ignoring e.preventDefault(); from a jQuery call because method: :get is set -
experimentally i've learned following code: <td><%= link_to 'notify', '/w/'+w.id+'/notify', method: :get, :class => "btn btn-success notify-btn" %></td> fires regardless of jquery: $('.notify-btn').click(function(e){ e.preventdefault(); bootbox.confirm("alert?", function(result){ if(result === true){ return true; } else { return false; } }); }); and it's due method: :get. removed elements of link one-by-one , tried various combinations. if method: :get there, it's going fire. i can prevent e.stoppropagation, won't follow link at all . if click ok sits on page doing nothing. if rid of erb , use straight html so: <a href="/w/53531e8a963e6503c60002b2/notify" class="btn btn-success notify-btn" data-method="get">notify</a> and data-method="get" there, same result. if remo...