fix dashboard search

This commit is contained in:
Alex Turchyn
2023-09-23 10:19:14 +03:00
parent 5643094a7a
commit cf85bea0df
2 changed files with 2 additions and 2 deletions
+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