class Errorkit::ErrorsMailer
Public Instance Methods
error_notification(error_id)
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 11 def error_notification(error_id) @error = Error.find(error_id) mail(:to => mailer_recipients, :from => mailer_sender, :subject => mailer_subject) do |format| format.html { render "#{mailer_name}/error_notification" } end end
Protected Instance Methods
append_view_paths()
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 42 def append_view_paths append_view_path Pathname.new(File.expand_path('../../../', __FILE__)).join('lib', 'generators', 'errorkit', 'templates', 'app', 'views') end
error()
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 23 def error @error end
mailer_recipients()
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 27 def mailer_recipients Errorkit.config.mailer_recipients end
mailer_sender()
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 31 def mailer_sender Errorkit.config.mailer_sender end
mailer_subject()
click to toggle source
# File lib/errorkit/errors_mailer.rb, line 35 def mailer_subject message = error.message message = message[0..27] + '...' if message.length > 30 "[#{error.environment || 'Error'}] #{error.exception}: #{message}" end