Skip to content

Instantly share code, notes, and snippets.

@iqbalhasnan
Created July 6, 2014 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iqbalhasnan/b89d33ade2f2942cd2c6 to your computer and use it in GitHub Desktop.
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
# 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