add archived template and submission pages
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TemplatesArchivedSubmissionsController < ApplicationController
|
||||
def show
|
||||
@template = current_account.templates.find(params[:template_id])
|
||||
|
||||
@pagy, @submissions = pagy(@template.submissions.where.not(deleted_at: nil).preload(:submitters).order(id: :desc))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user