Module: Metadata

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

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 = {}) ⇒ Object



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

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