1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-02 13:49:42 +00:00

Preload changeset associations (#19706).

git-svn-id: http://svn.redmine.org/redmine/trunk@14239 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-05-09 09:03:15 +00:00
parent 5c18e6d045
commit b64601888f

View File

@ -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? }