Created
October 27, 2014 11:39
-
-
Save thesunwave/9c1afd4f7db4b18f1867 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
def after_sign_in_path_for(resource) | |
root_path | |
end | |
def after_sign_out_path_for(resource_or_scope) | |
request.referrer | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment