Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splitsdb. a not-super-great speedrun splits sharer that was rebooted into splits.io
Something went wrong. Try again.
123456789101112131415161718class 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 helper_method :current_user_session, :current_user
private def current_user_session return @current_user_session if defined?(@current_user_session) @current_user_session = UserSession.find end
def current_user return @current_user if defined?(@current_user) @current_user = current_user_session && current_user_session.user endend