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, Section, ViewBuilder

Constant Summary collapse

SECTION_FIELDS =
[:edit_info, :help, :label, :unspecified]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_tagsObject


68
69
70
# File 'app/models/metadata.rb', line 68

def self.required_tags
  @required_tags ||= Hash.new { |h, k| h[k] = Array.new }
end

Instance Method Details

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


4
5
6
7
8
9
# File 'app/models/metadata.rb', line 4

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