Created
January 27, 2012 05:04
-
-
Save ilake/1687098 to your computer and use it in GitHub Desktop.
Async Emails With Sorcery by delayed_job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/initializers/sorcery_async_email.rb | |
module Sorcery | |
module InstanceMethods | |
def generic_send_email(method, mailer) | |
config = sorcery_config | |
config.send(mailer).delay.send(config.send(method),self) | |
end | |
end | |
end | |
end |
This the original sorcery method
def generic_send_email(method, mailer)
config = sorcery_config
mail = config.send(mailer).send(config.send(method),self)
if defined?(ActionMailer) and config.send(mailer).superclass == ActionMailer::Base
mail.deliver
end
end
That is very simple overwrite, so I am not sure your problem, maybe you should check all your setting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my project can not work for this!
have anything need to edit?