Sha256: 7c8aea607998b3b79eb39197f5e635d7dfbf32e3e79b579cdd65f9aefc8fa966
Contents?: true
Size: 444 Bytes
Versions: 5
Compression:
Stored size: 444 Bytes
Contents
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 helper_method :current_user def current_user return unless has_signed_in? @current_user ||= User.first_or_create end def has_signed_in? session[:intro_admin_authenticated] == Intro.config.admin_username_digest end end
Version data entries
5 entries across 5 versions & 1 rubygems