summaryrefslogtreecommitdiffstats
path: root/app/controllers/boards_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-31 17:21:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-31 17:21:14 +0000
commitd99dbe9f0c55febbbfd980dc458856a543125ea6 (patch)
treefa9b6db0889b0be874bb2c4e48ef5a104088510b /app/controllers/boards_controller.rb
parent3f88fd44ef61a770f1f5de52d091c6e707f38aa5 (diff)
downloadredmine-d99dbe9f0c55febbbfd980dc458856a543125ea6.tar.gz
redmine-d99dbe9f0c55febbbfd980dc458856a543125ea6.zip
Eager loading and no extra count query.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10144 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/boards_controller.rb')
-rw-r--r--app/controllers/boards_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb
index 3dea52bfb..cea2cd3bd 100644
--- a/app/controllers/boards_controller.rb
+++ b/app/controllers/boards_controller.rb
@@ -25,7 +25,7 @@ class BoardsController < ApplicationController
helper :watchers
def index
- @boards = @project.boards
+ @boards = @project.boards.includes(:last_message => :author).all
# show the board if there is only one
if @boards.size == 1
@board = @boards.first