class Wco::ApplicationController
def current_leadset
def current_leadset @current_leadset ||= current_profile.leadset end
def current_profile
def current_profile @current_profile ||= Wco::Profile.find_by( email: current_user.email ) end
def exception_notifier(exc)
def exception_notifier(exc) puts! exc, "wco_models custom Exception" ::ExceptionNotifier.notify_exception( exc, data: { backtrace: exc.backtrace, } ) raise exc end
def flash_alert what
def flash_alert what flash[:alert] ||= [] if String == what.class str = what else str = "Cannot create/update #{what.class.name}: #{what.errors.full_messages.join(', ')} ." end flash[:alert] << str end
def flash_notice what
def flash_notice what flash[:notice] ||= [] if String == what.class str = what else str = "Created/updated #{what.class.name} ." end flash[:notice] << str end
def home
def home authorize! :home, Wco end
def my_truthy? which
def my_truthy? which ["1", "t", "T", "true"].include?( which ) end
def set_lists
def set_lists end
def tinymce
def tinymce authorize! :home, Wco render layout: false end