foodsoft/app/controllers/users_controller.rb

12 lines
285 B
Ruby
Raw Normal View History

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|
2013-10-29 18:46:55 +01:00
format.json { render :json => @users.map(&:token_attributes) }
end
end
end