end
def show
- @journals = @issue.journals.includes(:user, :details).
- references(:user, :details).
- reorder(:created_on, :id).to_a
+ @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)
Journal.preload_journals_details_custom_fields(@journals)
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')