summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-19 00:37:04 -0700
committerelijah <elijah@riseup.net>2013-06-19 00:37:04 -0700
commit5c19ac7f6f457552c7c11a87b8417591abde7061 (patch)
tree73999a3a2dfdfaaa139115233835fe129ce3d347
parent7b6463d424af490bd8f09d0dd6898512bbb9ca2f (diff)
add commented out code of how redirect should work with Warden, although I can't get it working.
-rw-r--r--users/app/controllers/sessions_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb
index 01ecff6..d6c455b 100644
--- a/users/app/controllers/sessions_controller.rb
+++ b/users/app/controllers/sessions_controller.rb
@@ -22,4 +22,15 @@ class SessionsController < ApplicationController
logout
redirect_to root_path
end
+
+ #
+ # this is a bad hack, but user_overview_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"
+ # throw :warden, response.finish
+ #end
+
end