fix sort
This commit is contained in:
parent
fc177a30f7
commit
b0f216ba17
|
@ -64,7 +64,11 @@ class ProjectsController < ApplicationController
|
||||||
@heads = @project.repo.heads
|
@heads = @project.repo.heads
|
||||||
@commits = @heads.map do |h|
|
@commits = @heads.map do |h|
|
||||||
@project.repo.log(h.name, nil, :since => @date)
|
@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")
|
@messages = project.notes.last_week.limit(40).order("created_at DESC")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue