Sha256: 2f8ab7fd4f0c9cb319ae1bd929f929ec8c2160c38789de47299b9d3f18765ef1
Contents?: true
Size: 412 Bytes
Versions: 9
Compression:
Stored size: 412 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery rescue_from StandardError do |e| pp e.backtrace raise e end def current_user # for testing purposes we just create a user and store it in the db @current_user ||= begin u = User.find_by_id(session[:user_id]) || User.create(:first_name =>"Michael") session[:user_id] = u.id u end end end
Version data entries
9 entries across 9 versions & 1 rubygems