Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-04-06 10:37:46 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-04-15 15:38:15 +0300
commit33f8b06c3925fbefd6eac38efc71eac8b787ebd7 (patch)
tree73556e330e0714897dc6facdcd579c8043561b99 /app/controllers/autocomplete_controller.rb
parent77a24965cafba42b596039f9058e2e11a7ebc0dd (diff)
parentf76bfed9fc3e52c7b3b731dbb311b6b394d9af62 (diff)
Merge branch 'master' into assign-to-issuable-opener
Diffstat (limited to 'app/controllers/autocomplete_controller.rb')
-rw-r--r--app/controllers/autocomplete_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb
index e595b233e30..eb0abc80ab4 100644
--- a/app/controllers/autocomplete_controller.rb
+++ b/app/controllers/autocomplete_controller.rb
@@ -15,8 +15,9 @@ class AutocompleteController < ApplicationController
@users = [*@users, current_user]
end
- if params[:author_id] && params[:author_id] != "false"
- @users = [User.find(params[:author_id]), *@users]
+ if params[:author_id].present?
+ author = User.find_by_id(params[:author_id])
+ @users = [author, *@users] if author
end
@users.uniq!