mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 15:22:33 -05:00
optimize select
This commit is contained in:
1 parent
e54d76f0e2
commit
3cb37748e9
11 files changed
+60
-18
No files matched your search
@@ -17,7 +17,7 @@ class TemplatesSharedController < ApplicationController
|
||||
|
||||
@templates = Templates.search_shared(current_user, @templates, params[:q])
|
||||
|
||||
@pagy, @templates = pagy_auto(@templates, limit: 12)
|
||||
@pagy, @templates = pagy_auto(@templates.select_for_list, limit: 12)
|
||||
|
||||
return unless params[:q].present? && @templates.blank?
|
||||
|
||||
@@ -42,6 +42,6 @@ class TemplatesSharedController < ApplicationController
|
||||
related_submissions = Submissions.search(current_user, related_submissions, params[:q])
|
||||
.order(id: :desc)
|
||||
|
||||
pagy_auto(related_submissions, limit: 5)
|
||||
pagy_auto(related_submissions.select_for_list, limit: 5)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user