Commit e20ee201 authored by jplang's avatar jplang

Performance: avoid one "SELECT 1 ..." query per project on user memberships form.

git-svn-id: https://svn.redmine.org/redmine/trunk@11510 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent ee6c2de7
......@@ -343,7 +343,7 @@ module ApplicationHelper
def options_for_membership_project_select(principal, projects)
options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---")
options << project_tree_options_for_select(projects) do |p|
{:disabled => principal.projects.include?(p)}
{:disabled => principal.projects.to_a.include?(p)}
end
options
end
......
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