summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-05-09 09:03:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-05-09 09:03:15 +0000
commitb64601888fcc57943c572704fc9d4304b7a341bf (patch)
tree8d6c7d60b12161af4702424878ecb506d73c8b45
parent5c18e6d0459b3227fd9708a5c621eb9baae573c9 (diff)
downloadredmine-b64601888fcc57943c572704fc9d4304b7a341bf.tar.gz
redmine-b64601888fcc57943c572704fc9d4304b7a341bf.zip
Preload changeset associations (#19706).
git-svn-id: http://svn.redmine.org/redmine/trunk@14239 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/issues_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 8bc326eaa..4525aa390 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -103,7 +103,7 @@ class IssuesController < ApplicationController
@journals.select! {|journal| journal.notes? || journal.visible_details.any?}
@journals.reverse! if User.current.wants_comments_in_reverse_order?
- @changesets = @issue.changesets.visible.to_a
+ @changesets = @issue.changesets.visible.preload(:repository, :user).to_a
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }