Update autocomplete_controller to be more readable

This commit is contained in:
Felipe Orlando 2015-11-22 06:04:20 -02:00
parent 9155c82fdc
commit 075e3661c5

View file

@ -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