foodsoft/app/controllers/users_controller.rb
2013-09-20 23:18:06 +02:00

11 lines
292 B
Ruby

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