Skip to content

Instantly share code, notes, and snippets.

@peterfication
Last active November 30, 2017 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterfication/a7287156243c68dcc2fd63e92796ac59 to your computer and use it in GitHub Desktop.
Save peterfication/a7287156243c68dcc2fd63e92796ac59 to your computer and use it in GitHub Desktop.
Rails SweetAlert confirm old
// Override the default confirm dialog of Rails
$.rails.handleConfirm = link => {
if (link.data('confirm') === undefined){
return true
}
showSweetAlertConfirmationDialog(link)
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment