diff options
| author | Robert | 2017-07-10 16:19:59 +0200 |
|---|---|---|
| committer | Robert | 2017-07-10 16:19:59 +0200 |
| commit | 2da5bd656b9bbd99d9dac3bdd46ea1f75163e459 (patch) | |
| tree | be8748128ce20bd1f099d47a600d5e1827780573 /app | |
| parent | 9041ceafc736982a2bab52cd4c2c5c3581ee711c (diff) | |
| parent | d1a055b6a2bbeae4f217fe85660a0612e22dabd1 (diff) | |
| download | chouette-core-2da5bd656b9bbd99d9dac3bdd46ea1f75163e459.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'app')
| -rw-r--r-- | app/jobs/mailer_job.rb | 2 | ||||
| -rw-r--r-- | app/mailers/calendar_mailer.rb | 2 | ||||
| -rw-r--r-- | app/views/calendar_mailer/created.html.slim | 3 | ||||
| -rw-r--r-- | app/views/calendar_mailer/updated.html.slim | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/app/jobs/mailer_job.rb b/app/jobs/mailer_job.rb index 6d3dc642d..761a29cd6 100644 --- a/app/jobs/mailer_job.rb +++ b/app/jobs/mailer_job.rb @@ -2,6 +2,6 @@ class MailerJob < ActiveJob::Base queue_as :mail def perform klass, action, params - klass.constantize.public_send(action, *params).deliver + klass.constantize.public_send(action, *params).deliver_later end end diff --git a/app/mailers/calendar_mailer.rb b/app/mailers/calendar_mailer.rb index 44dcaea88..cc8175a07 100644 --- a/app/mailers/calendar_mailer.rb +++ b/app/mailers/calendar_mailer.rb @@ -1,9 +1,11 @@ class CalendarMailer < ApplicationMailer def updated calendar, user + @calendar = calendar mail to: user.email, subject: t('mailers.calendar_mailer.updated.subject') end def created calendar, user + @calendar = calendar mail to: user.email, subject: t('mailers.calendar_mailer.created.subject') end end diff --git a/app/views/calendar_mailer/created.html.slim b/app/views/calendar_mailer/created.html.slim index 621796d34..da15b7189 100644 --- a/app/views/calendar_mailer/created.html.slim +++ b/app/views/calendar_mailer/created.html.slim @@ -1,2 +1 @@ -div = t('mailers.calendar_mailer.created.body') - +div = t('mailers.calendar_mailer.created.body', cal_name: @calendar.name, cal_index_url: calendars_url) diff --git a/app/views/calendar_mailer/updated.html.slim b/app/views/calendar_mailer/updated.html.slim index 7f6deda07..f70480107 100644 --- a/app/views/calendar_mailer/updated.html.slim +++ b/app/views/calendar_mailer/updated.html.slim @@ -1,2 +1,2 @@ -div = t('mailers.calendar_mailer.updated.body') +div = t('mailers.calendar_mailer.updated.body', cal_name: @calendar.name, cal_index_url: calendars_url) |
