summaryrefslogtreecommitdiffstats
path: root/app/controllers/files_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-02 21:28:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-02 21:28:19 +0000
commit85b5b1c7f007d7d81bd79e8682212b71f84e6ca9 (patch)
treed039e4bdf9a85dfcdc9f79871d4810e7259765c9 /app/controllers/files_controller.rb
parentb4438b29d6b7131d6800b48f813bf3ba4ed30bd5 (diff)
downloadredmine-85b5b1c7f007d7d81bd79e8682212b71f84e6ca9.tar.gz
redmine-85b5b1c7f007d7d81bd79e8682212b71f84e6ca9.zip
Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10925 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/files_controller.rb')
-rw-r--r--app/controllers/files_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index f96cd4a9f..94965dbfc 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -31,8 +31,8 @@ class FilesController < ApplicationController
'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads"
- @containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)]
- @containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
+ @containers = [ Project.includes(:attachments).reorder(sort_clause).find(@project.id)]
+ @containers += @project.versions.includes(:attachments).reorder(sort_clause).all.sort.reverse
render :layout => !request.xhr?
end