fix dashboard search

This commit is contained in:
Alex Turchyn committed 2023-09-24 11:21:50 +03:00
1 parent 5643094a7a
commit cf85bea0df
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ class DashboardController < ApplicationController
def filter_templates(templates)
rel = templates.active.preload(:author).order(id: :desc)
.where(folder_id: current_account.default_template_folder.id)
rel = rel.where(folder_id: current_account.default_template_folder.id) if params[:q].blank?
Templates.search(rel, params[:q])
end