adjust completed action
This commit is contained in:
@@ -55,7 +55,7 @@ class SubmitFormController < ApplicationController
|
||||
end
|
||||
|
||||
def completed
|
||||
@submitter = Submitter.find_by!(slug: params[:submit_form_slug])
|
||||
@submitter = Submitter.completed.find_by!(slug: params[:submit_form_slug])
|
||||
end
|
||||
|
||||
def success; end
|
||||
|
||||
@@ -53,6 +53,8 @@ class Submitter < ApplicationRecord
|
||||
has_many :document_generation_events, dependent: :destroy
|
||||
has_many :submission_events, dependent: :destroy
|
||||
|
||||
scope :completed, -> { where.not(completed_at: nil) }
|
||||
|
||||
def status
|
||||
if completed_at?
|
||||
'completed'
|
||||
|
||||
Reference in New Issue
Block a user