Commit 62d3f467 authored by jplang's avatar jplang

Preload email addresses for displaying avatars.

git-svn-id: https://svn.redmine.org/redmine/trunk@15624 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 49f0b676
......@@ -93,8 +93,9 @@ class IssuesController < ApplicationController
end
def show
@journals = @issue.journals.includes(:user, :details).
references(:user, :details).
@journals = @issue.journals.
preload(:details).
preload(:user => :email_address).
reorder(:created_on, :id).to_a
@journals.each_with_index {|j,i| j.indice = i+1}
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
......
......@@ -47,7 +47,7 @@ module WatchersHelper
def watchers_list(object)
remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
content = ''.html_safe
lis = object.watcher_users.collect do |user|
lis = object.watcher_users.preload(:email_address).collect do |user|
s = ''.html_safe
s << avatar(user, :size => "16").to_s
s << link_to_user(user, :class => 'user')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment