Skip to content

Commit 23a3683

Browse files
author
Tony Novak
committed
fixes smartinez87#249 Deprecation of #deliver on Rails 4.2.0
1 parent f9dee5b commit 23a3683

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/exception_notifier/email_notifier.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ def mailer
146146
end
147147

148148
def call(exception, options={})
149-
create_email(exception, options).deliver
149+
message = create_email(exception, options)
150+
if message.respond_to?(:deliver_now)
151+
message.deliver_now
152+
else
153+
message.deliver
154+
end
150155
end
151156

152157
def create_email(exception, options={})

0 commit comments

Comments
 (0)