Created
March 14, 2020 18:27
-
-
Save donrestarone/dca90561ed019edeea562e181b030ddc to your computer and use it in GitHub Desktop.
a simple job for sending emails to users
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
class EmailConfirmationJob < ApplicationJob | |
queue_as :default | |
def perform(user_id) | |
user = User.find(user_id) | |
user.set_email_verification_sent | |
UserMailer.welcome_email_confirmation(user).deliver_now | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment