Skip to content

Instantly share code, notes, and snippets.

@donrestarone
Created March 14, 2020 18:27
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 donrestarone/dca90561ed019edeea562e181b030ddc to your computer and use it in GitHub Desktop.
Save donrestarone/dca90561ed019edeea562e181b030ddc to your computer and use it in GitHub Desktop.
a simple job for sending emails to users
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