Module: Api::SampleTubeIO::Extensions

Included in:
SampleTube
Defined in:
app/models/api/sample_tube_io.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


11
12
13
14
15
16
17
18
19
20
# File 'app/models/api/sample_tube_io.rb', line 11

def self.included(base)
  base.class_eval do
    extend ClassMethods

    scope :including_associations_for_json, lambda {
                                              includes([:uuid_object, :barcodes,
                                                        { primary_aliquot: { sample: :uuid_object } }, :scanned_into_lab_event])
                                            }
  end
end