mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
14 lines
297 B
Ruby
14 lines
297 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class Users::MailerSendingJob < ApplicationJob
|
||
|
|
queue_as :mailers
|
||
|
|
|
||
|
|
def perform(user_id, email_type, **options)
|
||
|
|
user = User.find(user_id)
|
||
|
|
|
||
|
|
params = { user: user }.merge(options)
|
||
|
|
|
||
|
|
UsersMailer.with(params).public_send(email_type).deliver_later
|
||
|
|
end
|
||
|
|
end
|