diff options
author | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
commit | dc740e4311101bf7297996788b25a99edafbe759 (patch) | |
tree | d989456179551fb167f6c41ba4b54bbd4a77a7ac /app/controllers/v1 | |
parent | 19da5429308412c19176733d2b32ccbf2c08df1c (diff) | |
parent | 0cc11ebb609de225fbeacbf80788b992b88b6ce6 (diff) |
Merge pull request #173 from azul/feature/unblock-handles
Allow admins to unblock handles
Diffstat (limited to 'app/controllers/v1')
-rw-r--r-- | app/controllers/v1/users_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/v1/users_controller.rb b/app/controllers/v1/users_controller.rb index 8897d01..006e6d8 100644 --- a/app/controllers/v1/users_controller.rb +++ b/app/controllers/v1/users_controller.rb @@ -11,7 +11,7 @@ module V1 # used for autocomplete for admins in the web ui def index if params[:query] - @users = User.by_login.startkey(params[:query]).endkey(params[:query].succ) + @users = User.login_starts_with(params[:query]) respond_with @users.map(&:login).sort else render :json => {'error' => 'query required', 'status' => :unprocessable_entity} |