summaryrefslogtreecommitdiff
path: root/users/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/controllers/users_controller.rb')
-rw-r--r--users/app/controllers/users_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 0dbf641..81336be 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -12,11 +12,16 @@ class UsersController < UsersBaseController
def index
if params[:query]
- @users = User.by_login.startkey(params[:query]).endkey(params[:query].succ)
+ if @user = User.find_by_login(params[:query])
+ redirect_to user_overview_url(@user)
+ return
+ else
+ @users = User.by_login.startkey(params[:query]).endkey(params[:query].succ)
+ end
else
@users = User.by_created_at.descending
end
- @users = @users.limit(APP_CONFIG[:pagination_size])
+ @users = @users.limit(100)
end
def new