diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-18 15:55:51 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-18 15:55:51 +0400 |
commit | 3f9577f786dce82b1611ec4f2d8d6b8f9a65eb40 (patch) | |
tree | d15b48a3ef9d53b30f4046046a03d2493d3bd701 /app | |
parent | 8e9a115a91ca39377fb697bf890a17d629b3903e (diff) |
fix sort
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3fc1bf5f9a6..5a558bde64f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -64,7 +64,11 @@ 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 }.sort { |x, y| x.committed_date <=> x.committed_date } + end.flatten.uniq { |c| c.id } + + @commits.sort! do |x, y| + y.committed_date <=> x.committed_date + end @messages = project.notes.last_week.limit(40).order("created_at DESC") end |