Commit 34789f3a authored by Rémy Coutable's avatar Rémy Coutable Committed by Alejandro Rodríguez

Merge branch 'autocomplete-find-user-improv' into 'master'

Improved Ruby code in autocomplete user search

## What does this MR do?

Improves the Ruby code for finding users in the assignee dropdown based on the Ruby review.

See merge request !7576
parent 936fb018
...@@ -55,7 +55,7 @@ class AutocompleteController < ApplicationController ...@@ -55,7 +55,7 @@ class AutocompleteController < ApplicationController
def find_users def find_users
@users = @users =
if @project if @project
user_ids = @project.team.users.map(&:id) user_ids = @project.team.users.pluck(:id)
if params[:author_id].present? if params[:author_id].present?
user_ids << params[:author_id] user_ids << params[:author_id]
......
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