From ddcb98ed9161d699f4b1a52924544205f24d7c8c Mon Sep 17 00:00:00 2001 From: Robin Steiner Date: Fri, 24 May 2024 11:05:07 +0200 Subject: [PATCH] Switch skills_filter to more database oriented sorting --- app/domain/skills_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/domain/skills_filter.rb b/app/domain/skills_filter.rb index e43016f41..308dc204b 100644 --- a/app/domain/skills_filter.rb +++ b/app/domain/skills_filter.rb @@ -19,7 +19,7 @@ def scope if title.present? filtered_entries = filtered_entries.where('lower(skills.title) like lower(?)', "%#{title}%") end - filtered_entries.sort_by { |s| s.title.downcase } + filtered_entries.order(:title) end private