Skip to content

Instantly share code, notes, and snippets.

@tsipiniuk
Forked from askehansen/confirm.js
Last active August 29, 2015 14:21
Show Gist options
  • Save tsipiniuk/ffe30316df1f7b1ea540 to your computer and use it in GitHub Desktop.
Save tsipiniuk/ffe30316df1f7b1ea540 to your computer and use it in GitHub Desktop.
$.rails.allowAction = function(element) {
var message = element.data('confirm');
if (!message) {
return true;
}
bootbox.confirm(message, function(result) {
if (result) {
$.rails.handleMethod(element);
}
});
return false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment