Class: RexJobMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- RexJobMailer
- Defined in:
- app/mailers/rex_job_mailer.rb
Instance Method Summary collapse
Instance Method Details
#job_finished(job, opts = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/mailers/rex_job_mailer.rb', line 4 def job_finished(job, opts = {}) @job = job @subject = opts[:subject] || _('REX job has finished - %s') % @job.to_s if @job.user.nil? Rails.logger.warn 'Job user no longer exist, skipping email notification' return end mail(to: @job.user.mail, subject: @subject) end |