Skip to content

Commit

Permalink
Merge pull request #151 from hitobito/fix-list-table-sorting
Browse files Browse the repository at this point in the history
Simplify sort mappings
  • Loading branch information
njaeggi authored Nov 26, 2024
2 parents aa580dc + ece6859 commit 17e68c5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions app/controllers/song_counts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,9 @@ class SongCountsController < SimpleCrudController

self.nesting = Group
self.permitted_attrs = [:song_id, :year, :count]
self.sort_mappings = {title: {
joins: [:song],
order: ["songs.title"]
},
composed_by: {
joins: [:song],
order: ["songs.composed_by"]
},
arranged_by: {
joins: [:song],
order: ["songs.arranged_by"]
}}
self.sort_mappings = {title: "songs.title",
composed_by: "songs.composed_by",
arranged_by: "songs.arranged_by"}

respond_to :js
helper_method :census
Expand Down

0 comments on commit 17e68c5

Please sign in to comment.