ref: master
app/mailers/pending_task_notifier.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
class PendingTaskNotifier < ApplicationMailer def notification(person) self.environment = person.environment @person = person @tasks = person.tasks.pending @organizations_with_pending_tasks = person.organizations_with_pending_tasks @url = url_for(:host => person.environment.default_hostname, :controller => 'home') @default_hostname = person.environment.default_hostname @url_for_pending_tasks = url_for(:host => person.environment.default_hostname, :controller => 'tasks', :profile => person.identifier) mail( to: person.email, from: "#{person.environment.name} <#{person.environment.noreply_email}>".html_safe, subject: _("[%s] Pending tasks").html_safe % person.environment.name ) end end |