Class: UsersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/users_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

current

Instance Method Details

#indexObject

Currently used to display users nick and ids for autocomplete


4
5
6
7
8
9
# File 'app/controllers/users_controller.rb', line 4

def index
  @users = User.undeleted.natural_search(params[:q])
  respond_to do |format|
    format.json { render :json => @users.map(&:token_attributes) }
  end
end