Commit 3f5e999f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #9846 from fbeegle/master

Update autocomplete_controller to be more readable
parents e6149a7e 075e3661
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment