Module: ModelExtensions::SampleManifest

Included in:
SampleManifest
Defined in:
app/api/model_extensions/sample_manifest.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/api/model_extensions/sample_manifest.rb', line 2

def self.included(base)
  base.class_eval do
    scope :include_samples, -> {
      includes(
        samples: [
          :uuid_object, {
            sample_metadata: :reference_genome,
            primary_study: { study_metadata: :reference_genome }
          }
        ]
      )
    }
    delegate :io_samples, to: :core_behaviour
  end
end