module AutoError::Config
Public Class Methods
setup( ) { |self| ... }
click to toggle source
# File lib/auto_error/config.rb, line 3 def self.setup( &blk ) yield self end
Private Class Methods
set_defaults()
click to toggle source
# File lib/auto_error/config.rb, line 27 def self.set_defaults self.setup do |config| config.error_template_renderer = ->( status ) do render template: "/errors/#{status}", layout: 'errors', status: status end config.email_sender = %{"Notifier" notifications@example.com} config.email_on_error = [] ExceptionNotifier.add_notifier :email, {} # ExceptionNotifier::Notifier.prepend_view_path( # AutoError::Engine.root.join( *%w{app views auto_error} ) # ) config.auth_with = ->( c ) { true } config.helpers = [ 'ApplicationHelper' ] config.data_handlers = Hash.new do |h, k| h[k] = ->( value ) { "<strong>#{value}</strong>" } end end end