diff options
author | Valery Sizov <valery@gitlab.com> | 2016-11-03 13:22:56 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-11-04 14:41:14 +0300 |
commit | b7dff1b072204c8c2ad480301b3139e4823c41f4 (patch) | |
tree | b880d065fab69692dca0c637b27ae526d66d25ce /app/controllers | |
parent | 5ef2bd192aa9b3ecbfc23e83c6984e2a818fb736 (diff) |
Fix: Todos Filter Shows All Users
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/autocomplete_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb index b48668eea87..daa82336208 100644 --- a/app/controllers/autocomplete_controller.rb +++ b/app/controllers/autocomplete_controller.rb @@ -11,9 +11,13 @@ class AutocompleteController < ApplicationController @users = @users.reorder(:name) @users = @users.page(params[:page]) + if params[:todo_filter].present? + @users = @users.todo_authors(current_user.id, params[:todo_state_filter]) + end + if params[:search].blank? # Include current user if available to filter by "Me" - if params[:current_user] && current_user + if params[:current_user].present? && current_user @users = [*@users, current_user] end |