lib/quality/interactors/qc_sample_interactor.rb
# After creating a QC sample, calculate the route to be redirected.
After creating a QC sample, calculate the route to be redirected.
After creating a QC sample calculate the route to be redirected .
def qc_sample_created_redirect(instance)
      return "/raw_materials/deliveries/rmt_deliveries/#{instance.rmt_delivery_id}" if instance.rmt_delivery_id
      return "/quality/qc/qc_samples/#{instance.id}/manage" if instance.production_run_id
      return "/quality/qc/qc_samples/#{instance.id}/manage" if instance.presort_run_lot_number
      '/'
    end
def qc_sample_created_redirect ( instance ) return "/raw_materials/deliveries/rmt_deliveries/#{instance.rmt_delivery_id}" if instance . rmt_delivery_id return "/quality/qc/qc_samples/#{instance.id}/manage" if instance . production_run_id return "/quality/qc/qc_samples/#{instance.id}/manage" if instance . presort_run_lot_number '/' end
After creating a QC sample, calculate the route to be redirected.
After creating a QC sample calculate the route to be redirected .
instance
<not_specific>