Module: Press::Labels

Defined in:
lib/press/labels.rb

Class Method Summary collapse

Class Method Details

.unit_tray_header1(taxon_name_id = []) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/press/labels.rb', line 3

def self.unit_tray_header1(taxon_name_id = [])
  return nil if [taxon_name_id].flatten.empty?
  created = 0
  ::TaxonName.where(id: taxon_name_id).each do |t|
    ::Label::Generated::UnitTrayHeader1.create!(
      text: 'Unit tray header to be generated for ' + t.cached,
      total: 1,
      label_object: t,
    )
    created += 1
  end
  return created
end