##// END OF EJS Templates
Replaces find(:all) calls....
Jean-Philippe Lang -
r10698:85b5b1c7f007
parent child
Show More
@@ -31,8 +31,8 class FilesController < ApplicationController
31 'size' => "#{Attachment.table_name}.filesize",
31 'size' => "#{Attachment.table_name}.filesize",
32 'downloads' => "#{Attachment.table_name}.downloads"
32 'downloads' => "#{Attachment.table_name}.downloads"
33
33
34 @containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)]
34 @containers = [ Project.includes(:attachments).reorder(sort_clause).find(@project.id)]
35 @containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
35 @containers += @project.versions.includes(:attachments).reorder(sort_clause).all.sort.reverse
36 render :layout => !request.xhr?
36 render :layout => !request.xhr?
37 end
37 end
38
38
General Comments 0
You need to be logged in to leave comments. Login now