adjust submitter edit
This commit is contained in:
committed by
Oleksandr Turchyn
parent
e0a297cf81
commit
d6474f0e6e
@@ -9,6 +9,13 @@ class SubmissionsController < ApplicationController
|
||||
def show
|
||||
@submission = Submissions.preload_with_pages(@submission)
|
||||
|
||||
unless @submission.submitters.all?(&:completed_at?)
|
||||
ActiveRecord::Associations::Preloader.new(
|
||||
records: [@submission],
|
||||
associations: [submitters: :start_form_submission_events]
|
||||
).call
|
||||
end
|
||||
|
||||
render :show, layout: 'plain'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user