Module: Metadata

Included in:
Lane, PacBioLibraryTube, Plate, Project, Request, Sample, Study
Defined in:
app/models/metadata.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Classes: AccessionedTag, Base, BuilderBase, FormBuilder, Metadata, Section, ViewBuilder

Constant Summary collapse

SECTION_FIELDS =
%i[edit_info help label unspecified].freeze

Instance Method Summary collapse

Instance Method Details

#has_metadata(options = {}, &block) ⇒ Object


7
8
9
10
11
12
# File 'app/models/metadata.rb', line 7

def (options = {}, &block)
  as_class = options.delete(:as) || self
  table_name = options.delete(:table_name) || "#{as_class.name.demodulize.underscore}_metadata"
  (table_name, as_class, &block)
  build_association(as_class, options)
end