Added new autocomplete for task assignments.
Introduced the cool jquery token plugin.
This commit is contained in:
parent
2e56bfe895
commit
5d028ccf3a
10 changed files with 880 additions and 13 deletions
11
app/controllers/users_controller.rb
Normal file
11
app/controllers/users_controller.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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|
|
||||
format.json { render :json => @users.map { |u| {:id => u.id, :name => u.nick} } }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue