diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-04-06 10:37:46 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-04-15 15:38:15 +0300 |
commit | 33f8b06c3925fbefd6eac38efc71eac8b787ebd7 (patch) | |
tree | 73556e330e0714897dc6facdcd579c8043561b99 /app/controllers/autocomplete_controller.rb | |
parent | 77a24965cafba42b596039f9058e2e11a7ebc0dd (diff) | |
parent | f76bfed9fc3e52c7b3b731dbb311b6b394d9af62 (diff) |
Merge branch 'master' into assign-to-issuable-opener
Diffstat (limited to 'app/controllers/autocomplete_controller.rb')
-rw-r--r-- | app/controllers/autocomplete_controller.rb | 5 |
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! |