Class: QcReport

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

Defined Under Namespace

Modules: ReportBehaviour, StateMachine Classes: File

Instance Method Summary collapse

Methods included from StateMachine

included

Methods inherited from ApplicationRecord

alias_association, 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



155
156
157
# File 'app/models/qc_report.rb', line 155

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

#product_idObject



151
152
153
# File 'app/models/qc_report.rb', line 151

def product_id
  product.try(:id)
end

#schedule_reportObject

Reports are handled asynchronously



143
144
145
# File 'app/models/qc_report.rb', line 143

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

#to_paramObject



147
148
149
# File 'app/models/qc_report.rb', line 147

def to_param
  report_identifier
end