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.26 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.25 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.24 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.23 app/mailers/motor/notifications_mailer.rb
motor-admin-pz-0.4.22 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.22 app/mailers/motor/notifications_mailer.rb
motor-admin-pz-0.4.21 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.21 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.20 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.19 app/mailers/motor/notifications_mailer.rb
motor-admin-pz-0.4.18.1 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.18 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.17 app/mailers/motor/notifications_mailer.rb
motor-alexandermohan-admin-panel-0.4.161 app/mailers/motor/notifications_mailer.rb
alexandermohan-admin-panel-0.4.161 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.16 app/mailers/motor/notifications_mailer.rb
motor-admin-pz-0.4.14 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.15 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.14 app/mailers/motor/notifications_mailer.rb
motor-admin-0.4.13 app/mailers/motor/notifications_mailer.rb