Class: UcbRailsUser::Configuration::ExceptionNotification

Inherits:
Object
  • Object
show all
Defined in:
app/models/ucb_rails_user/configuration/exception_notification.rb

Class Method Summary collapse

Class Method Details

.configure(config) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'app/models/ucb_rails_user/configuration/exception_notification.rb', line 8

def configure(config)
  return if config.blank?

  config = config.symbolize_keys
  config[:email].symbolize_keys!
  config[:email][:email_prefix] = config[:email][:email_prefix].gsub("{env}", RailsEnvironment.short)

  Rails.application.config.middleware.use ::ExceptionNotification::Rack, config
end