Files
docuseal/app/controllers/templates_archived_submissions_controller.rb
T

12 lines
374 B
Ruby
Raw Normal View History

2023-09-15 00:42:51 +03:00
# 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