Class: Tube::MixedSubmissionMx

Inherits:
Purpose show all
Defined in:
app/models/tube/mixed_submission_mx.rb

Overview

MixedSubmissioMX tubes can contain aliquots produced under multiple submissions. This disrupts the usual means of looking up the customer requests, as transfer requests effectively belong to multiple submissions. Ultimately we probably want to look at eliminating these classes and to unify their behaviour under a standard class.

Instance Method Summary collapse

Methods inherited from Purpose

#create!, #library_source_plates, #sibling_tubes, standard_library_tube, standard_mx_tube, standard_sample_tube, stock_library_tube, stock_mx_tube, #stock_plate

Methods inherited from Purpose

#barcode_type, #prefix=, #set_default_barcode_prefix, #source_plate, #target_class

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods included from Purpose::Relationship::Associations

included

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#transition_to(tube, state, _user, _ = nil, _customer_accepts_responsibility = false) ⇒ Object


10
11
12
13
14
15
16
17
# File 'app/models/tube/mixed_submission_mx.rb', line 10

def transition_to(tube, state, _user, _ = nil, _customer_accepts_responsibility = false)
  tube.transfer_requests_as_target.opened.each do |request|
    request.transition_to(state)
  end
  tube.requests_as_target.opened.each do |request|
    request.transition_to(state)
  end
end