class ApplicationController < ActionController::Base before_action :authenticate_user! before_action :set_paper_trail_whodunnit rescue_from CanCan::AccessDenied do |exception| redirect_to root_url, notice: "You are not authorized to access this page." end end