foodsoft/app/controllers/users_controller.rb
2021-03-02 09:12:19 +01:00

9 lines
301 B
Ruby

class UsersController < ApplicationController
# Currently used to display users nick and ids for autocomplete
def index
@users = User.undeleted.natural_search(params[:q])
respond_to do |format|
format.json { render :json => @users.map(&:token_attributes).to_json }
end
end
end