summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-19 00:37:04 -0700
committerelijah <elijah@riseup.net>2013-07-04 04:02:06 -0700
commit2e4ebdb84a464cf2ee902eb6e9bc955d77bafa73 (patch)
tree79c53b649e37da97cfe6d9870aa37507dd9d6dda
parent27073d1fb5fd2e42abe3adf46e958be2e618ab41 (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