2023-09-15 00:42:51 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
class TemplatesArchivedController < ApplicationController
|
|
|
|
|
def index
|
|
|
|
|
templates = current_account.templates.where.not(deleted_at: nil).preload(:author).order(id: :desc)
|
2023-09-15 02:11:48 +03:00
|
|
|
templates = Templates.search(templates, params[:q])
|
2023-09-15 00:42:51 +03:00
|
|
|
|
|
|
|
|
@pagy, @templates = pagy(templates, items: 12)
|
|
|
|
|
end
|
|
|
|
|
end
|