Eager loading and no extra count query.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10144 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3f88fd44ef
commit
d99dbe9f0c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue