Fix Mailer.upcoming_tasks
This commit is contained in:
parent
de94220758
commit
9757e7a216
2 changed files with 3 additions and 2 deletions
|
@ -35,6 +35,7 @@ class Mailer < ActionMailer::Base
|
||||||
def upcoming_tasks(user, task)
|
def upcoming_tasks(user, task)
|
||||||
@user = user
|
@user = user
|
||||||
@task = task
|
@task = task
|
||||||
|
@next_tasks = Task.order(:due_date).next_assigned_tasks_for(user)
|
||||||
|
|
||||||
mail to: user,
|
mail to: user,
|
||||||
subject: I18n.t('mailer.upcoming_tasks.subject')
|
subject: I18n.t('mailer.upcoming_tasks.subject')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
= raw t '.text0', user: @user.name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat'))
|
= raw t '.text0', user: @user.name, task: @task.name, when: I18n.l(@task.due_date, format: t('mailer.dateformat'))
|
||||||
- if @user.next_tasks.size > 0
|
- if @next_tasks.size > 0
|
||||||
= raw t '.nextweek'
|
= raw t '.nextweek'
|
||||||
- for next_task in @user.next_tasks
|
- for next_task in @next_tasks
|
||||||
- next if next_task == @task
|
- next if next_task == @task
|
||||||
* #{raw I18n.l next_task.due_date, format: t('mailer.dateformat')} #{raw next_task.name}
|
* #{raw I18n.l next_task.due_date, format: t('mailer.dateformat')} #{raw next_task.name}
|
||||||
= raw t '.text1', user_tasks_url: user_tasks_url, foodcoop: FoodsoftConfig[:name]
|
= raw t '.text1', user_tasks_url: user_tasks_url, foodcoop: FoodsoftConfig[:name]
|
||||||
|
|
Loading…
Reference in a new issue