Files
docuseal/app/controllers/templates_archived_controller.rb
T

13 lines
416 B
Ruby
Raw Normal View History

2023-09-15 00:42:51 +03:00
# frozen_string_literal: true
class TemplatesArchivedController < ApplicationController
2023-09-17 00:45:57 +03:00
load_and_authorize_resource :template, parent: false
2023-09-15 00:42:51 +03:00
def index
2024-12-08 01:37:20 +02:00
@templates = @templates.where.not(archived_at: nil).preload(:author, :folder, :template_accesses).order(id: :desc)
2025-06-05 13:16:55 +03:00
@templates = Templates.search(current_user, @templates, params[:q])
2023-09-15 00:42:51 +03:00
2025-05-28 22:48:15 +03:00
@pagy, @templates = pagy_auto(@templates, limit: 12)
2023-09-15 00:42:51 +03:00
end
end