From 2e4ebdb84a464cf2ee902eb6e9bc955d77bafa73 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 19 Jun 2013 00:37:04 -0700 Subject: add commented out code of how redirect should work with Warden, although I can't get it working. --- users/app/controllers/sessions_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'users/app/controllers/sessions_controller.rb') 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 -- cgit v1.2.3