Sha256: 444aad40d159b00d1fe6dfe869b3c6ef5a193a4b6b753a2657dbb5c3e9a0638e
Contents?: true
Size: 375 Bytes
Versions: 8
Compression:
Stored size: 375 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery protected def current_user @current_user ||= User.find_by_id(session[:user_id]) end def signed_in? !!current_user end helper_method :current_user, :signed_in? def current_user=(user) @current_user = user session[:user_id] = user.id end end
Version data entries
8 entries across 8 versions & 1 rubygems