fix query

This commit is contained in:
Pete Matsyburka
2025-04-23 12:16:50 +03:00
parent 7fee82ded2
commit 4e5abb3c09
6 changed files with 20 additions and 15 deletions
@@ -7,7 +7,7 @@ class TemplateFoldersController < ApplicationController
@templates = @template_folder.templates.active.accessible_by(current_ability)
.preload(:author, :template_accesses)
@templates = Templates.search(@templates, params[:q])
@templates = Templates::Order.call(@templates, cookies.permanent[:dashboard_templates_order])
@templates = Templates::Order.call(@templates, current_user, cookies.permanent[:dashboard_templates_order])
@pagy, @templates = pagy(@templates, limit: 12)
end