Module: Api::AliquotIO::Extensions

Included in:
Aliquot
Defined in:
app/models/api/aliquot_io.rb

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
21
22
23
24
25
26
27
# File 'app/models/api/aliquot_io.rb', line 11

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

    scope :including_associations_for_json, -> {
      includes([
        :uuid_object,
        { sample: :uuid_object },
        { study: :uuid_object },
        { project: :uuid_object },
        { tag: :uuid_object },
        { library: :uuid_object },
        { receptacle: :uuid_object }
      ])
    }
  end
end