about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-11-04 21:15:22 +0100
committerGitHub <noreply@github.com>2020-11-04 21:15:22 +0100
commitb29defb851f091d9b4419ea149b44dac7944bd06 (patch)
tree82608a918aa8a90af9fa4ebb0876c4e190f98e34 /app/controllers
parentd6fe0c94ca48a10d579cf5ec321c33c6124b402d (diff)
Change order of announcements in admin page to sort them newest-first (#15091)
* Change order of announcements in admin page to sort show newly-created first

Fixes #15090

* Use reverse-chronological rather than creation date only
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/announcements_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/announcements_controller.rb b/app/controllers/admin/announcements_controller.rb
index 494fd13d0..351b9a991 100644
--- a/app/controllers/admin/announcements_controller.rb
+++ b/app/controllers/admin/announcements_controller.rb
@@ -71,7 +71,7 @@ class Admin::AnnouncementsController < Admin::BaseController
   private
 
   def set_announcements
-    @announcements = AnnouncementFilter.new(filter_params).results.page(params[:page])
+    @announcements = AnnouncementFilter.new(filter_params).results.reverse_chronological.page(params[:page])
   end
 
   def set_announcement