Closed moeabdol closed 9 years ago
In my Rails 4 application I'm using sweet alert to show notice and alert flash messages. I have the following in my application.js
$(document).ready(function(){ "use strict"; // show flash messages if any if($(".flash-message").length){ var key = $(".flash-message").attr("key"); var value = $(".flash-message").attr("value"); showNotificationMessage(key, value); } }); function showNotificationMessage(key, value){ if(key === "success" || key === "notice"){ swal({ title: value, type: "success", timer: 3000, showConfirmButton: false, }); } else{ swal({ title: value, type: "error", timer: 3000, showConfirmButton: false, }); } }
However, sweetalert still shows an ok button. Is this a current issue? or is there a way around it?
I got to hide the confirm button once I added sweetalert-rails gem in my Gemfile.
gem "sweet-alert" gem "sweetalert-rails" gem "sweet-alert-confirm"
In my Rails 4 application I'm using sweet alert to show notice and alert flash messages. I have the following in my application.js
However, sweetalert still shows an ok button. Is this a current issue? or is there a way around it?