Class: WunderlistMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- WunderlistMailer
- Defined in:
- app/mailers/wunderlist_mailer.rb
Overview
make sure to require mail gem
Instance Method Summary collapse
-
#email_task(task, options) ⇒ Object
Email the task to Wunderlist and set its importance.
Instance Method Details
#email_task(task, options) ⇒ Object
Email the task to Wunderlist and set its importance
6 7 8 9 10 11 12 13 14 |
# File 'app/mailers/wunderlist_mailer.rb', line 6 def email_task(task, ) = {:to => "[email protected]"} [:subject] = .has_key?(:wunderlist_list) ? [:wunderlist_list] : '' [:from] = [:wunderlist_email] @task = task @task.name = @task.asset_type.empty? ? @task.name : "#{@task.name} for #{@task.asset.name} (#{@task.asset_type.downcase})" @important_marker = ['due_asap', 'due_today'].include?(@task.bucket) ? '*' : '' mail() end |