Sha256: 2361643be588ce114d643b447d2b173cfb489c26fb61bd487e3444f1b0c334ed

Contents?: true

Size: 805 Bytes

Versions: 54

Compression:

Stored size: 805 Bytes

Contents

# frozen_string_literal: true

module Motor
  class NotificationsMailer < ApplicationMailer
    def notify_mention_email(notification)
      @notification = notification

      @note = notification.record

      subject =
        "#{@note.author&.email || 'Anonymous'} mentioned you in " \
        "#{@note.record.class.model_name.human} ##{@note.record.id}"

      mail(
        from: from_address,
        to: notification.recipient.email,
        subject: subject
      )
    end

    def notify_reminder_email(notification)
      @notification = notification

      @note = notification.record.record

      mail(
        from: from_address,
        to: notification.recipient.email,
        subject: "Reminder for #{@note.record.class.model_name.human} ##{@note.record.id}"
      )
    end
  end
end

Version data entries

54 entries across 54 versions & 6 rubygems

Version Path
motor-admin-0.4.34 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.33 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.32 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.31 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.30 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.29 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.28 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.35 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.34 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.33 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.32 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.31 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.30 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.29 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.28 app/mailers/motor/notifications_mailer.rb
motor-admin-cstham8-0.4.27 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.27 app/mailers/motor/notifications_mailer.rb
motor-admin-unosquare-0.4.28 app/mailers/motor/notifications_mailer.rb
motor-admin-unosquare-0.4.27 app/mailers/motor/notifications_mailer.rb
motor-admin-pz-0.4.26 app/mailers/motor/notifications_mailer.rb