mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 07:42:32 -05:00
optimize select
This commit is contained in:
1 parent
e54d76f0e2
commit
3cb37748e9
11 files changed
+60
-18
No files matched your search
@@ -10,7 +10,7 @@ class TemplatesArchivedController < ApplicationController
|
||||
|
||||
@templates = Templates.search(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?
|
||||
|
||||
@@ -31,6 +31,6 @@ class TemplatesArchivedController < 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