Module: Api::StudyIO::Extensions

Included in:
Study
Defined in:
app/models/api/study_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


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/models/api/study_io.rb', line 12

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

    scope :including_associations_for_json,
          -> {
            includes(
              [
                :uuid_object,
                {
                  study_metadata: %i[faculty_sponsor reference_genome study_type data_release_study_type],
                  roles: :users
                }
              ]
            )
          }
  end
end

Instance Method Details

#render_classObject


31
32
33
# File 'app/models/api/study_io.rb', line 31

def render_class
  Api::StudyIO
end