OSDN Git Service

Merge pull request #2015 from elvanja/commits-group-and-sort-by-date-desc
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 5 Mar 2013 14:40:13 +0000 (06:40 -0800)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 5 Mar 2013 14:40:13 +0000 (06:40 -0800)
fix: grouping commits by date desc doesn't sort the groups too

1  2 
app/views/commits/_commits.html.haml

@@@ -1,6 -1,6 +1,6 @@@
- - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits|
+ - @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
    %div.ui-box
 -    %h5.small
 +    %h5.title
        %i.icon-calendar
 -      = day.stamp("28 Aug, 2010")
 -    %ul.unstyled= render commits
 +      %span= day.stamp("28 Aug, 2010")
 +    %ul.well-list= render commits