Class: BatchRequest
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- BatchRequest
- Includes:
- Api::BatchRequestIO::Extensions, Uuid::Uuidable
- Defined in:
- app/models/batch_request.rb
Overview
Join table linking Batch to Request Requests can be alocated a specific order by setting 'position'. This is especially useful for determining Lane order for SequencingRequest.
Instance Attribute Summary collapse
-
#sorting_requests_within_batch ⇒ Object
(also: #sorting_requests_within_batch?)
Ensure that any requests that are added have a position that is unique and incremental in the batch, unless we're moving them around in the batch, in which case we assume it'll be valid.
Instance Method Summary collapse
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
Methods included from Api::BatchRequestIO::Extensions
Methods inherited from ApplicationRecord
convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Methods included from Warren::BroadcastMessages
#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren
Instance Attribute Details
#sorting_requests_within_batch ⇒ Object Also known as: sorting_requests_within_batch?
Ensure that any requests that are added have a position that is unique and incremental in the batch, unless we're moving them around in the batch, in which case we assume it'll be valid.
18 19 20 |
# File 'app/models/batch_request.rb', line 18 def sorting_requests_within_batch @sorting_requests_within_batch end |
Instance Method Details
#move_to_position!(position) ⇒ Object
35 36 37 |
# File 'app/models/batch_request.rb', line 35 def move_to_position!(position) update!(sorting_requests_within_batch: true, position: position) end |