Skip to content

Instantly share code, notes, and snippets.

@peterfication
Last active November 30, 2017 06:49
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/c4ce8c7125ab077ce004ad7dd0fe9275 to your computer and use it in GitHub Desktop.
Save peterfication/c4ce8c7125ab077ce004ad7dd0fe9275 to your computer and use it in GitHub Desktop.
First try SweetAlert Rails confirm new
// 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