Module: SampleManifest::CoreBehaviour::StockAssets

Included in:
PlateBehaviour::Core, SampleTubeBehaviour::Core, TubeRackBehaviour::Core
Defined in:
app/models/sample_manifest/core_behaviour.rb

Overview

The samples get registered in the stock resource table at the end of manifest upload and processing (It used to happen here)

Instance Method Summary collapse

Instance Method Details

#generate_sample_and_aliquot(sanger_sample_id, receptacle) ⇒ Object


36
37
38
39
40
41
# File 'app/models/sample_manifest/core_behaviour.rb', line 36

def generate_sample_and_aliquot(sanger_sample_id, receptacle)
  create_sample(sanger_sample_id).tap do |sample|
    receptacle.aliquots.create!(sample: sample, study: study)
    study.samples << sample
  end
end

#stocks?Boolean

Returns:

  • (Boolean)

43
44
45
# File 'app/models/sample_manifest/core_behaviour.rb', line 43

def stocks?
  true
end