Backport differences in global search from EE to CE

This commit is contained in:
Nick Thomas 2017-04-04 12:57:16 +01:00
parent 5efd67942c
commit 099acf714f
1 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,11 @@ module Search
end
def scope
@scope ||= %w[issues merge_requests milestones].delete(params[:scope]) { 'projects' }
@scope ||= begin
allowed_scopes = %w[issues merge_requests milestones]
allowed_scopes.delete(params[:scope]) { 'projects' }
end
end
end
end