Skip to content

Instantly share code, notes, and snippets.

@danmcclain
Forked from robotmay/delayed_devise_mailer.rb
Created October 20, 2011 11:52
Show Gist options
  • Save danmcclain/1300962 to your computer and use it in GitHub Desktop.
Save danmcclain/1300962 to your computer and use it in GitHub Desktop.
A quick hack to make Devise send its confirmation/password reset/unlock emails via delayed_job. Chuck the following in a file under config/initializers
module Devise
module Models
module Confirmable
handle_asynchronously :send_confirmation_instructions
end
module Recoverable
handle_asynchronously :send_reset_password_instructions
end
module Lockable
handle_asynchronously :send_unlock_instructions
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment