From fbce1b01ef9426243d9119a855c333435d5c015f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 27 Jul 2017 16:46:52 +0000 Subject: Preload members project to prevent multiple cache hits. git-svn-id: http://svn.redmine.org/redmine/trunk@16898 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/settings/_members.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/settings/_members.html.erb') diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index 39f50c105..ac8769fc6 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -1,4 +1,4 @@ -<% members = @project.memberships.sorted.to_a %> +<% members = @project.memberships.preload(:project).sorted.to_a %>

<%= link_to l(:label_member_new), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %>

-- cgit v1.2.3