Class: Event::AccessioningEvent
- Inherits:
-
Event
- Object
- ActiveRecord::Base
- ApplicationRecord
- Event
- Event::AccessioningEvent
- Defined in:
- app/models/event/accessioning_event.rb
Class Method Summary collapse
-
.assigned_accession_number!(eventable, accession_type, accession_number, user) ⇒ Object
Indicates that an accessionable entity has been assigned an accession number.
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
.assigned_accession_number!(eventable, accession_type, accession_number, user) ⇒ Object
Indicates that an accessionable entity has been assigned an accession number.
Usage example: sample.events.assigned_accession_number!('sample', 'ENA123456', user)
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/event/accessioning_event.rb', line 7 def self.assigned_accession_number!(eventable, accession_type, accession_number, user) create!( eventful: eventable, message: "Assigned #{accession_type} accession number", content: accession_number, family: 'accessioning', of_interest_to: 'administrators', created_by: user&.login ) end |