I have the following code in my document.ready
technicianDropdownFromCBU(cbu_id);
assetsDropdownFromCBU(cbu_id);
if(#{@appointment.technician_id.present?}){
$('#appointment_technician_id').val('{@appointment.technician_id}');
}
I only want the if statement to run after the first two functions are finished executing. I can't modify those functions and include the if statement in that code, because the function is called multiple times.
when...then...