Class: UsersController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

current

Methods included from PathHelper

#finance_group_transactions_path

Instance Method Details

#indexObject

Currently used to display users nick and ids for autocomplete



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

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