Skip to content

Instantly share code, notes, and snippets.

@kkestell
Created November 10, 2011 14:35
Show Gist options
  • Save kkestell/1354976 to your computer and use it in GitHub Desktop.
Save kkestell/1354976 to your computer and use it in GitHub Desktop.
Login Redirection - Session Controller
class SessionsController < Devise::SessionsController
def after_sign_in_path_for(resource)
if session[:post_auth_path]
url = session[:post_auth_path]
session[:post_auth_path] = nil
else
url = root_path
end
url
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment