Class: Event::SampleManifestEvent
- Inherits:
-
Event
- Object
- ActiveRecord::Base
- ApplicationRecord
- Event
- Event::SampleManifestEvent
- Defined in:
- app/models/event/sample_manifest_event.rb
Class Method Summary collapse
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
.created_sample!(sample, user) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/models/event/sample_manifest_event.rb', line 3 def self.created_sample!(sample, user) create!( eventful: sample, message: 'Created by Sample Manifest', content: Date.today.to_s, family: 'created_sample_using_sample_manifest', created_by: user ? user.login : nil ) end |
.updated_sample!(sample, user) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/models/event/sample_manifest_event.rb', line 13 def self.updated_sample!(sample, user) create!( eventful: sample, message: 'Updated by Sample Manifest', content: Date.today.to_s, family: 'updated_sample_using_sample_manifest', created_by: user&.login ) end |