Class: TasksMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/tasks_mailer.rb

Instance Method Summary collapse

Instance Method Details

#long_tasks(report, opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/mailers/tasks_mailer.rb', line 4

def long_tasks(report, opts = {})
  return if report.tasks.empty?

  @report = report
  @subject = opts[:subject]
  @subject ||= _('Tasks pending since %s') % (@report.time - @report.interval)
  mail(to: report.user.mail, subject: @subject)
end