Skip to content

Instantly share code, notes, and snippets.

@descovi
Created December 13, 2017 12:27
Show Gist options
  • Save descovi/ab0552ad3b9dca6e46f0b6025337183d to your computer and use it in GitHub Desktop.
Save descovi/ab0552ad3b9dca6e46f0b6025337183d to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
def after_sign_in_path_for(resource)
request.env['omniauth.origin'] || stored_location_for(resource) || root_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment