summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb4
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