Class: QcReport
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- QcReport
- Includes:
- AASM, ReportBehaviour, StateMachine
- Defined in:
- app/models/qc_report.rb
Defined Under Namespace
Modules: ReportBehaviour, StateMachine Classes: File
Instance Method Summary collapse
- #original_qc_decision(metrics) ⇒ Object
- #product_id ⇒ Object
-
#schedule_report ⇒ Object
Reports are handled asynchronously.
- #to_param ⇒ Object
Methods included from StateMachine
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
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_id ⇒ Object
151 152 153 |
# File 'app/models/qc_report.rb', line 151 def product_id product.try(:id) end |
#schedule_report ⇒ Object
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_param ⇒ Object
147 148 149 |
# File 'app/models/qc_report.rb', line 147 def to_param report_identifier end |