Sha256: e1c031383b81f80d7917cd3faa4bdbc07ae57833cddb94b837ae10b9d337932e
Contents?: true
Size: 472 Bytes
Versions: 22
Compression:
Stored size: 472 Bytes
Contents
class ApplicationController < ActionController::Base include ExceptionHandler before_action :check_env_variables helper_method :authorized? private def authorized? session['tokens'].present? end def check_env_variables missing_vars = %w[HUBSPOT_CLIENT_ID HUBSPOT_CLIENT_SECRET].select { |var| ENV[var].blank? } raise(ExceptionHandler::HubspotError.new, "Please specify #{missing_vars.join(', ')} in .env") if missing_vars.present? end end
Version data entries
22 entries across 22 versions & 1 rubygems