diff options
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) | 
