Commit b0f216ba17434250baf387bb3c5878bce0571306
1 parent
fc177a30
Exists in
master
and in
4 other branches
fix sort
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/controllers/projects_controller.rb
| @@ -64,7 +64,11 @@ class ProjectsController < ApplicationController | @@ -64,7 +64,11 @@ class ProjectsController < ApplicationController | ||
| 64 | @heads = @project.repo.heads | 64 | @heads = @project.repo.heads |
| 65 | @commits = @heads.map do |h| | 65 | @commits = @heads.map do |h| |
| 66 | @project.repo.log(h.name, nil, :since => @date) | 66 | @project.repo.log(h.name, nil, :since => @date) |
| 67 | - end.flatten.uniq { |c| c.id }.sort { |x, y| x.committed_date <=> x.committed_date } | 67 | + end.flatten.uniq { |c| c.id } |
| 68 | + | ||
| 69 | + @commits.sort! do |x, y| | ||
| 70 | + y.committed_date <=> x.committed_date | ||
| 71 | + end | ||
| 68 | 72 | ||
| 69 | @messages = project.notes.last_week.limit(40).order("created_at DESC") | 73 | @messages = project.notes.last_week.limit(40).order("created_at DESC") |
| 70 | end | 74 | end |