Module: Api::PlateIO::Extensions

Included in:
Plate
Defined in:
app/models/api/plate_io.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


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

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

    scope :including_associations_for_json, lambda {
                                              includes([:uuid_object, :plate_metadata, :barcodes,
                                                        { plate_purpose: :uuid_object }])
                                            }
  end
end

Instance Method Details

#json_rootObject


22
23
24
# File 'app/models/api/plate_io.rb', line 22

def json_root
  'plate'
end