summaryrefslogtreecommitdiffstats
path: root/app/controllers/documents_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/documents_controller.rb')
-rw-r--r--app/controllers/documents_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 979fc6004..cf40d1293 100644
--- a/app/controllers/documents_controller.rb
+++ b/app/controllers/documents_controller.rb
@@ -27,7 +27,7 @@ class DocumentsController < ApplicationController
def index
@sort_by = %w(category date title author).include?(params[:sort_by]) ? params[:sort_by] : 'category'
- documents = @project.documents.find :all, :include => [:attachments, :category]
+ documents = @project.documents.includes(:attachments, :category).all
case @sort_by
when 'date'
@grouped = documents.group_by {|d| d.updated_on.to_date }