app/controllers/rooms_controller.rb
# Search for the friend to start chat
Search for the friend to start chat
Search for the friend to start chat
def user_autocomplete
    @users = @users.order(:username).where("username like ?", "%#{params[:value]}%")
    respond_to do |format|
      format.js
    end
  end
def user_autocomplete @users = @users . order ( :username ) . where ( "username like ?" , "%#{params[:value]}%" ) respond_to do | format | format . js end end
Search for the friend to start chat
Search for the friend to start chat