optimize search

This commit is contained in:
Pete Matsyburka
2026-06-25 20:26:33 +03:00
parent 721172c980
commit 506609f3cd
3 changed files with 27 additions and 6 deletions
@@ -15,7 +15,7 @@ class TemplatesSharedController < ApplicationController
@templates = @templates.preload(:author, :template_accesses, :template_sharings)
.order(id: :desc)
@templates = Templates.search(current_user, @templates, params[:q])
@templates = Templates.search_shared(current_user, @templates, params[:q])
@pagy, @templates = pagy_auto(@templates, limit: 12)