Merge pull request #9846 from fbeegle/master
Update autocomplete_controller to be more readable
This commit is contained in:
commit
3f5e999fe7
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class AutocompleteController < ApplicationController
|
|||
@users = @users.reorder(:name)
|
||||
@users = @users.page(params[:page]).per(PER_PAGE)
|
||||
|
||||
unless params[:search].present?
|
||||
if params[:search].blank?
|
||||
# Include current user if available to filter by "Me"
|
||||
if params[:current_user] && current_user
|
||||
@users = [*@users, current_user].uniq
|
||||
|
|
Loading…
Reference in a new issue