mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
511 B
16 lines
511 B
# frozen_string_literal: true
|
|
|
|
class TemplatesArchivedSubmissionsController < ApplicationController
|
|
load_and_authorize_resource :template
|
|
load_and_authorize_resource :submission, through: :template, parent: false
|
|
|
|
def index
|
|
@submissions = @submissions.where.not(deleted_at: nil)
|
|
@submissions = Submissions.search(@submissions, params[:q])
|
|
|
|
@pagy, @submissions = pagy(@submissions.preload(:submitters).order(id: :desc))
|
|
rescue ActiveRecord::RecordNotFound
|
|
redirect_to root_path
|
|
end
|
|
end
|