From a88b5c994eba3380b97adbb4db0b705be7a523d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20J=C3=A4ggi?= Date: Wed, 13 Nov 2024 10:55:39 +0100 Subject: [PATCH] Remove aggregate function from sort_mappings, since it is now handled by sortable --- app/controllers/song_counts_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/song_counts_controller.rb b/app/controllers/song_counts_controller.rb index beab7b2..6a59e07 100644 --- a/app/controllers/song_counts_controller.rb +++ b/app/controllers/song_counts_controller.rb @@ -13,15 +13,15 @@ class SongCountsController < SimpleCrudController self.permitted_attrs = [:song_id, :year, :count] self.sort_mappings = {title: { joins: [:song], - order: ["MAX(songs.title)"] + order: ["songs.title"] }, composed_by: { joins: [:song], - order: ["MAX(songs.composed_by)"] + order: ["songs.composed_by"] }, arranged_by: { joins: [:song], - order: ["MAX(songs.arranged_by)"] + order: ["songs.arranged_by"] }} respond_to :js