git-svn-id: http://svn.redmine.org/redmine/trunk@19272 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.2.0
@@ -33,7 +33,7 @@ class DocumentsController < ApplicationController | |||
documents = @project.documents.includes(:attachments, :category).to_a | |||
case @sort_by | |||
when 'date' | |||
documents.sort!{|a,b| b.updated_on <=> a.updated_on} | |||
documents.sort!{|a, b| b.updated_on <=> a.updated_on} | |||
@grouped = documents.group_by {|d| d.updated_on.to_date} | |||
when 'title' | |||
@grouped = documents.group_by {|d| d.title.first.upcase} |