Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 9302ae6d67
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (37 sloc) 0.951 kB
begin
require 'pony'
rescue LoadError
# let's assume ActionMailer instead
end
module Ixtlan
module Errors
if defined? Pony
class Deliver < Proc
def deliver
call
end
end
class Mailer
def self.error_notification(email_from, emails_to, exception, error_url)
Deliver.new do
Pony.mail( :from => email_from,
:to => emails_to,
:subject => exception.message,
:body => "#{error_url}" )
end
end
end
else
class Mailer < ActionMailer::Base
def error_notification(email_from, emails_to, exception, error_url)
@subject = exception.message
@text = "#{error_url}"
@recipients = emails_to
@from = email_from
@sent_on = Time.now
@headers = {}
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.