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

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#original_qc_decision(metrics) ⇒ Object


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

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

#product_idObject


138
139
140
# File 'app/models/qc_report.rb', line 138

def product_id
  product.try(:id)
end

#schedule_reportObject

Reports are handled asynchronously


130
131
132
# File 'app/models/qc_report.rb', line 130

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

#to_paramObject


134
135
136
# File 'app/models/qc_report.rb', line 134

def to_param
  report_identifier
end