add templates and submissions search

This commit is contained in:
Alex Turchyn
2023-09-15 02:11:48 +03:00
parent 7f6c0af0e8
commit 53fa35fd01
12 changed files with 101 additions and 23 deletions
+1
View File
@@ -8,6 +8,7 @@ class DashboardController < ApplicationController
return render 'pages/landing' unless signed_in?
templates = current_account.templates.active.preload(:author).order(id: :desc)
templates = Templates.search(templates, params[:q])
@pagy, @templates = pagy(templates, items: 12)
end