diff options
author | elijah <elijah@riseup.net> | 2013-07-04 01:34:06 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-07-04 04:15:04 -0700 |
commit | 03fc85ad20e91964267dfcdaab9e3036c5702689 (patch) | |
tree | 9bdd64920ace370d9d8850cf62960d092513560b /users/app/controllers | |
parent | 89ad6bd802f9e57c687e8cdb8593c3984e2fbd1b (diff) |
users - make a nice overview page (well, nice enough) and better users index/search.
Diffstat (limited to 'users/app/controllers')
-rw-r--r-- | users/app/controllers/users_controller.rb | 9 |
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 |