diff options
Diffstat (limited to 'app/controllers/autocomplete_controller.rb')
-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 |