diff options
author | Azul <azul@leap.se> | 2014-07-09 12:51:16 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-09 12:51:16 +0200 |
commit | 0cc11ebb609de225fbeacbf80788b992b88b6ce6 (patch) | |
tree | 3dbf8562e91ac7d7c8759a0516efbdca93cbdeff /app/controllers/v1 | |
parent | bdb4b0e275c205b0b44bbe3cc4ec4c162b309b37 (diff) |
list identities based on search only
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} |