Class: Presenters::TagPlate384Presenter

Inherits:
UnknownPlatePresenter show all
Defined in:
app/models/presenters/tag_plate_384_presenter.rb

Overview

This presenter enables printing labels for ‘Tag Plate - 384’ plates.

Instance Method Summary collapse

Instance Method Details

#add_unknown_plate_warningsObject



11
12
13
14
15
16
17
# File 'app/models/presenters/tag_plate_384_presenter.rb', line 11

def add_unknown_plate_warnings
  errors.add(
    :plate,
    "type '#{labware.purpose_name}' is not a limber plate. " \
      'You can still use this page to print labels.'
  )
end

#labelObject



6
7
8
9
# File 'app/models/presenters/tag_plate_384_presenter.rb', line 6

def label
  label_class = purpose_config.fetch(:label_class) || 'Labels::Plate384SingleLabel'
  label_class.constantize.new(labware)
end