27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# 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" [email protected]}
config.email_on_error = []
ExceptionNotifier.add_notifier :email, {}
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
|