From 70d6455284717f938016b1e1b569e0d0dadb11fc Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 3 Mar 2016 15:56:29 +0100 Subject: [PATCH] Sort starred projects on dashboard based on last activity by default Signed-off-by: Dmitriy Zaporozhets --- CHANGELOG | 1 + app/controllers/dashboard/projects_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 69a1927b765..7e99a39ccec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ v 8.6.0 (unreleased) - Update documentation to reflect Guest role not being enforced on internal projects - Allow search for logged out users - Don't show Issues/MRs from archived projects in Groups view + - Sort starred projects on dashboard based on last activity by default v 8.5.2 - Fix sidebar overlapping content when screen width was below 1200px diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb index aeafbd30143..dc880b634e5 100644 --- a/app/controllers/dashboard/projects_controller.rb +++ b/app/controllers/dashboard/projects_controller.rb @@ -31,7 +31,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController end def starred - @projects = current_user.starred_projects + @projects = current_user.starred_projects.sorted_by_activity @projects = @projects.includes(:namespace, :forked_from_project, :tags) @projects = @projects.sort(@sort = params[:sort])