Class: QcReport

Inherits:
ApplicationRecord show all
Includes:
AASM, ReportBehaviour, StateMachine
Defined in:
app/models/qc_report.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: ReportBehaviour, StateMachine Classes: File

Instance Method Summary collapse

Methods included from StateMachine

included

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Instance Method Details

#original_qc_decision(metrics) ⇒ Object


157
158
159
# File 'app/models/qc_report.rb', line 157

def original_qc_decision(metrics)
  product_criteria.asses(metrics)
end

#product_idObject


153
154
155
# File 'app/models/qc_report.rb', line 153

def product_id
  product.try(:id)
end

#schedule_reportObject

Reports are handled asynchronously


145
146
147
# File 'app/models/qc_report.rb', line 145

def schedule_report
  Delayed::Job.enqueue QcReportJob.new(id)
end

#to_paramObject


149
150
151
# File 'app/models/qc_report.rb', line 149

def to_param
  report_identifier
end