Skip to content

Commit

Permalink
Use delivery_now if available
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Sep 18, 2014
1 parent 3ace494 commit 67109b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/delayed/performable_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
module Delayed
class PerformableMailer < PerformableMethod
def perform
object.send(method_name, *args).deliver
mailer = object.send(method_name, *args)
mailer.respond_to?(:deliver_now) ? mailer.deliver_now : mailer.deliver
end
end

Expand Down

0 comments on commit 67109b3

Please sign in to comment.