Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10925 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b4438b29d6
commit
85b5b1c7f0
@ -31,8 +31,8 @@ class FilesController < ApplicationController
|
|||||||
'size' => "#{Attachment.table_name}.filesize",
|
'size' => "#{Attachment.table_name}.filesize",
|
||||||
'downloads' => "#{Attachment.table_name}.downloads"
|
'downloads' => "#{Attachment.table_name}.downloads"
|
||||||
|
|
||||||
@containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)]
|
@containers = [ Project.includes(:attachments).reorder(sort_clause).find(@project.id)]
|
||||||
@containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
|
@containers += @project.versions.includes(:attachments).reorder(sort_clause).all.sort.reverse
|
||||||
render :layout => !request.xhr?
|
render :layout => !request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user