Skip to content

Commit

Permalink
ensure data-method value is uppercase before comparison, fixes rails#507
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanallen committed Feb 16, 2018
1 parent 4b6e30f commit 39398ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rails.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
if (!metaClick && link.is(rails.linkDisableSelector)) rails.disableElement(link);

if (rails.isRemote(link)) {
if (metaClick && (!method || method === 'GET') && !data) { return true; }
if (metaClick && (!method || method.toUpperCase() === 'GET') && !data) { return true; }

var handleRemote = rails.handleRemote(link);
// Response from rails.handleRemote() will either be false or a deferred object promise.
Expand Down

0 comments on commit 39398ac

Please sign in to comment.