2011-05-14 19:41:46 +02:00
|
|
|
class UsersController < ApplicationController
|
|
|
|
|
|
|
|
# Currently used to display users nick and ids for autocomplete
|
|
|
|
def index
|
|
|
|
@users = User.where("nick LIKE ?", "%#{params[:q]}%")
|
|
|
|
respond_to do |format|
|
2011-05-15 22:06:54 +02:00
|
|
|
format.json { render :json => @users.map { |u| u.token_attributes } }
|
2011-05-14 19:41:46 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|