Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Working

Sebastian Velandia ssoulless

🤓
Working
View GitHub Profile
View application_controller.rb
class ApplicationController < ActionController::Base
before_action :store_location
protect_from_forgery with: :exception
def store_location
# store last url as long as it isn't a /users path
session[:previous_url] = request.referer unless request.fullpath =~ /\/users/
end
def after_sign_in_path_for(resource)