<commit_before>//= require 'toastr'

//toastr
toastr.options = {
  "closeButton": true,
  "debug": false,
  "progressBar": true,
  "positionClass": "toast-top-right",
  "showDuration": "300",
  "hideDuration": "1000",
  "timeOut": "5000",
  "extendedTimeOut": "1000",
  "showEasing": "swing",
  "hideEasing": "linear",
  "showMethod": "fadeIn",
  "hideMethod": "fadeOut"
};

var showToast = function(flash){
  console.log(flash);
  for(var i = 0; i < flash.length; i++ ){
    console.log(flash[i]);
    var msg = flash[i];
    var type = {
      notice: 'success',
      alert: 'error',
      warning: 'warning',
      info: 'info'
    };
    var options = {
      notice: {},
      alert: { "timeOut": "0", "extendedTimeOut": "0" },
      warning: { "timeOut": "0", "extendedTimeOut": "0" },
      info: {}
    };
    toastr[type[msg[0]]](msg[1], '', options[msg[0]]);
  }
};<commit_msg>Update toastr_rails.js<commit_after>//= require 'toastr'

//toastr
toastr.options = {
  "closeButton": true,
  "debug": false,
  "progressBar": true,
  "positionClass": "toast-top-right",
  "showDuration": "300",
  "hideDuration": "1000",
  "timeOut": "5000",
  "extendedTimeOut": "1000",
  "showEasing": "swing",
  "hideEasing": "linear",
  "showMethod": "fadeIn",
  "hideMethod": "fadeOut"
};

var showToast = function(flash){
  console.log(flash);
  for(var i = 0; i < flash.length; i++ ){
    console.log(flash[i]);
    var msg = flash[i];
    var type = {
      notice: 'success',
      success: 'success',
      alert: 'error',
      error: 'error',
      warning: 'warning',
      info: 'info'
    };
    var options = {
      notice: {},
      alert: { "timeOut": "0", "extendedTimeOut": "0" },
      warning: { "timeOut": "0", "extendedTimeOut": "0" },
      info: {}
    };
    try {
      toastr[type[msg[0]]](msg[1], '', options[msg[0]]);
    } catch(err) {
      toastr.info(msg[1], '', options[msg[0]]);
    }
  }
};
{'fraction_non_alphanumeric': 0.21532846715328466, 'fraction_numerical': 0.02502606882168926, 'mean_word_length': 3.109207708779443, 'pattern_counts': {'":': 32, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6014648', 'n_tokens_mistral': 742, 'n_tokens_neox': 715, 'n_words': 147}