Class: Submission::SubmissionPresenter

Inherits:
PresenterSkeleton show all
Defined in:
app/models/submission/submission_presenter.rb

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary

Attributes inherited from PresenterSkeleton

#id

Instance Method Summary collapse

Methods inherited from PresenterSkeleton

#cross_compatible?, #each_submission_warning, #initialize, #lanes_of_sequencing

Constructor Details

This class inherits a constructor from Submission::PresenterSkeleton

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Submission::PresenterSkeleton

Instance Method Details

#destroyObject

Deleting a Submission should also delete all associated Orders.


18
19
20
21
# File 'app/models/submission/submission_presenter.rb', line 18

def destroy
  submission.orders.destroy_all
  submission.destroy
end

#orderObject


13
14
15
# File 'app/models/submission/submission_presenter.rb', line 13

def order
  submission.orders.first
end

#submissionObject


5
6
7
# File 'app/models/submission/submission_presenter.rb', line 5

def submission
  @submission ||= Submission.find(id)
end