Sending Devise emails via Sidekiq (or any other job scheduler)
# File: user.rb
class User
# …
# Devise overrides
def send_on_create_confirmation_instructions
Devise::Mailer.delay_for(1.day).confirmation_instructions(self)
end
def send_reset_password_instructions
Devise::Mailer.delay.reset_password_instructions(self)
end
def send_unlock_instructions
Devise::Mailer.delay.unlock_instructions(self)
end
end
Written by Christoph Lupprich
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#