Class: Event::SampleLogisticsQcEvent
- Inherits:
-
Event
- Object
- ActiveRecord::Base
- ApplicationRecord
- Event
- Event::SampleLogisticsQcEvent
- Defined in:
- app/models/event/sample_logistics_qc_event.rb
Class Method Summary collapse
- .create_gel_qc_for_asset!(asset, result, user) ⇒ Object
- .gel_qc_message(asset, message, family, user) ⇒ Object
Methods inherited from Event
Methods included from RequestDescriptorUpdateEvent
included, #library_creation_descriptor?, #pass_or_fail_event?, #set_request_metadata, #update_metadata_for_request
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Class Method Details
.create_gel_qc_for_asset!(asset, result, user) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/models/event/sample_logistics_qc_event.rb', line 3 def self.create_gel_qc_for_asset!(asset, result, user) case asset when Well (asset, "Gel Analysed for well #{asset.id} with #{result}", 'gel_analysed', user) when Plate (asset, 'Gel Analysed', 'gel_analysed', user) end end |
.gel_qc_message(asset, message, family, user) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/models/event/sample_logistics_qc_event.rb', line 12 def self.(asset, , family, user) create!( eventful: asset, message: , content: Date.today.to_s, family: family, created_by: user ? user.login : nil ) end |