mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
add archived template and submission pages
This commit is contained in:
1 parent
3faec9d174
commit
7f6c0af0e8
15 files changed
+190
-66
No files matched your search
@@ -4,9 +4,11 @@ class TemplatesController < ApplicationController
|
||||
before_action :load_base_template, only: %i[new create]
|
||||
|
||||
def show
|
||||
@template = current_account.templates.active.find(params[:id])
|
||||
@template = current_account.templates.find(params[:id])
|
||||
submissions = @template.submissions
|
||||
submissions = submissions.active if @template.deleted_at.blank?
|
||||
|
||||
@pagy, @submissions = pagy(@template.submissions.active.preload(:submitters).order(id: :desc))
|
||||
@pagy, @submissions = pagy(submissions.preload(:submitters).order(id: :desc))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user