Created
July 6, 2014 05:14
-
-
Save iqbalhasnan/b89d33ade2f2942cd2c6 to your computer and use it in GitHub Desktop.
Rails 4.1.4 + Devise (3.2.4) + delayed_job mailer simple solution
This file contains 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
# app/models/User.rb | |
#As we all know that Devise sends all emails through the send_devise_notification method | |
#So, without having to install devise-async gem , we just need to change the code to send it asynchronously | |
# send to the delayed_job queue | |
def send_devise_notification(notification, *args) | |
devise_mailer.delay.send(notification, self, *args) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment