Class: Submission::SubmissionPresenter

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

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.


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

def destroy
  submission.orders.destroy_all
  submission.destroy
end

#orderObject


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

def order
  submission.orders.first
end

#submissionObject


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

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