<% if @error %>
  toastr.error("<%= @error_message || 'Unable to save the record. Please check all your fields.' %>")
<% else %>
  toastr.success('Record(s) has been successfully updated.');
  $(".data-table").DataTable().ajax.reload();
  $(".table--filter-bar").last().remove();
  $('.table--edit-record-modal').removeClass('show');
  $('.table--edit-record-modal').addClass('hide');
<% end %>
