Created
October 23, 2015 19:56
-
-
Save plicjo/664d15000a6b5de59f1a to your computer and use it in GitHub Desktop.
Going different places after sign in and sign out in Devise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
private | |
# Overwriting the sign_out redirect path method | |
def after_sign_out_path_for(resource_or_scope) | |
root_path | |
end | |
# Overwriting the sign_in redirect path method | |
def after_sign_out_path_for(resource_or_scope) | |
some_path | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the wiki where you can find all the Devise overrides
https://github.com/plataformatec/devise/wiki/How-To:-Change-the-redirect-path-after-destroying-a-session-i.e.-signing-out