Class: Api::SampleIo
Overview
Despite name controls rendering of warehouse messages for Sample Historically used to be v0.5 API
Defined Under Namespace
Modules: Extensions
Class Method Summary collapse
-
.create!(parameters) ⇒ Object
Whenever we create samples through the API we also need to register a sample tube too.
Methods inherited from Base
attributes_from_json, convert_json_attributes_to_attributes, default_object, extra_json_attributes, json_attribute_for_attribute, lookup_associated_record_from, map_attribute_to_json_attribute, map_attribute_to_json_attribute_in_errors, newer_than, performs_lookup?, render_class_for_model, renders_model, to_hash, to_hash_for_list, update!, with_association, with_nested_has_many_association
Class Method Details
.create!(parameters) ⇒ Object
Whenever we create samples through the API we also need to register a sample tube too. The user can then retrieve the sample tube information through the API.
112 113 114 |
# File 'app/models/api/sample_io.rb', line 112 def self.create!(parameters) super.tap { |sample| Tube::Purpose.standard_sample_tube.create!.aliquots.create!(sample:) } end |