From ec3f4f5bf06aa662b86079d815f9a68b556190f3 Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Thu, 14 Apr 2016 10:57:13 +0200
Subject: [PATCH] Projects on group page should be sorted by last activity
 instead of id/created_at

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
---
 app/controllers/groups_controller.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index c1adc999567..ee4fcc4e360 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -40,6 +40,7 @@ class GroupsController < Groups::ApplicationController
     @last_push = current_user.recent_push if current_user
 
     @projects = @projects.includes(:namespace)
+    @projects = @projects.sorted_by_activity
     @projects = filter_projects(@projects)
     @projects = @projects.sort(@sort = params[:sort])
     @projects = @projects.page(params[:page]) if params[:filter_projects].blank?
-- 
GitLab