Sha256: a630ee5391df2c13ab46cd9e46ba63d22df8bcd92e7f72c2f8723667eb2fc519
Contents?: true
Size: 897 Bytes
Versions: 11
Compression:
Stored size: 897 Bytes
Contents
class WcoHosting::ApplicationController < ActionController::Base check_authorization def home authorize! :index, ::WcoHosting::Appliance end ## ## private ## private def current_ability @current_ability ||= ::Wco::Ability.new(current_user) end def current_profile @current_profile ||= Wco::Profile.find_by( email: current_user.email ) end def current_leadset @current_leadset ||= current_profile.leadset end 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 flash[:notice] ||= [] if String == what.class str = what else str = "Created/updated #{what.class.name} ." end flash[:notice] << str end end
Version data entries
11 entries across 11 versions & 1 rubygems