Skip to content

Instantly share code, notes, and snippets.

View ssoulless's full-sized avatar
🤓
Working

Sebastian Velandia ssoulless

🤓
Working
View GitHub Profile
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)