From fc177a30f7beeeecf0e97863b8e2293b75928304 Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 18 Oct 2011 14:38:57 +0300 Subject: [PATCH] commit time sort --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index c6dcafab..3fc1bf5f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -64,7 +64,7 @@ class ProjectsController < ApplicationController @heads = @project.repo.heads @commits = @heads.map do |h| @project.repo.log(h.name, nil, :since => @date) - end.flatten.uniq { |c| c.id } + end.flatten.uniq { |c| c.id }.sort { |x, y| x.committed_date <=> x.committed_date } @messages = project.notes.last_week.limit(40).order("created_at DESC") end