From 4043dfed5c0be6f5ebe282335d350303030e05a8 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 17 Oct 2024 01:19:39 +0000 Subject: [PATCH] fix error for sort announcements --- app/helpers/announcements_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index 0272c8f..05989c4 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -181,7 +181,7 @@ module AnnouncementsHelper announcements = announcements.sort_by { |announcement| tmp1 = announcement["postdate"].blank? [ - -a['sort_number'].to_i, + -announcement['sort_number'].to_i, tmp1 ? 0 : 1, tmp1 ? nil : announcement["postdate"].to_time ] }.reverse