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/users_controller.rb | |
parent | bdb4b0e275c205b0b44bbe3cc4ec4c162b309b37 (diff) |
list identities based on search only
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r-- | app/controllers/users_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c8e09b6..5951413 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -12,12 +12,12 @@ class UsersController < UsersBaseController respond_to :html def index - if params[:query] + if params[:query].present? if @user = User.find_by_login(params[:query]) redirect_to @user return else - @users = User.by_login.startkey(params[:query]).endkey(params[:query].succ) + @users = User.login_starts_with(params[:query]) end else @users = User.by_created_at.descending |