summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-12-16 09:47:53 -0800
committerjessib <jessib@riseup.net>2013-12-16 09:47:53 -0800
commite2638a3a91cb2c6a426f856c4d1919be1a852b6a (patch)
tree3679d9b29dacee6997e9744207e305e32fc3857d /users/app/controllers
parent82d0ff664c9d4f5740c09f6ead28ffc02716956a (diff)
parent496817bd512fe43c4cb80cc49a19dae3ed3eb165 (diff)
Merge pull request #123 from azul/refactor/standartize-user-routes
refactor: remove Overview controller - we can use Users#show
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/overviews_controller.rb9
-rw-r--r--users/app/controllers/sessions_controller.rb4
-rw-r--r--users/app/controllers/users_controller.rb2
3 files changed, 3 insertions, 12 deletions
diff --git a/users/app/controllers/overviews_controller.rb b/users/app/controllers/overviews_controller.rb
deleted file mode 100644
index 52ce267..0000000
--- a/users/app/controllers/overviews_controller.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class OverviewsController < UsersBaseController
-
- before_filter :authorize
- before_filter :fetch_user
-
- def show
- end
-
-end
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb
index 0494b51..85a022e 100644
--- a/users/app/controllers/sessions_controller.rb
+++ b/users/app/controllers/sessions_controller.rb
@@ -14,12 +14,12 @@ class SessionsController < ApplicationController
end
#
- # this is a bad hack, but user_overview_url(user) is not available
+ # this is a bad hack, but user_url(user) is not available
# also, this doesn't work because the redirect happens as a PUT. no idea why.
#
#Warden::Manager.after_authentication do |user, auth, opts|
# response = Rack::Response.new
- # response.redirect "/users/#{user.id}/overview"
+ # response.redirect "/users/#{user.id}"
# throw :warden, response.finish
#end
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 8b4715c..0b32ec7 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -13,7 +13,7 @@ class UsersController < UsersBaseController
def index
if params[:query]
if @user = User.find_by_login(params[:query])
- redirect_to user_overview_url(@user)
+ redirect_to @user
return
else
@users = User.by_login.startkey(params[:query]).endkey(params[:query].succ)