Module: Api::SampleIo::Extensions
- Included in:
- Sample
- Defined in:
- app/models/api/sample_io.rb
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 |
# File 'app/models/api/sample_io.rb', line 12 def self.included(base) base.class_eval do extend ClassMethods scope :including_associations_for_json, lambda { includes( [:uuid_object, { sample_metadata: :reference_genome }, { studies: %i[study_metadata uuid_object] }] ) } end end |
Instance Method Details
#json_root ⇒ Object
25 26 27 |
# File 'app/models/api/sample_io.rb', line 25 def json_root 'sample' end |