Sha256: 08572b8c98df402e08b8c30b0836dde351cb94dceab3a6b1c9d9f2f218f333d0

Contents?: true

Size: 612 Bytes

Versions: 2

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

module NotificationPusher
  class ActionMailer
    class NotificationMailer < ApplicationMailer
      # rubocop:disable Metrics/ParameterLists
      def push(notification,
               from:, to: nil, renderer: 'actionmailer', layout: nil,
               mail_options: {})
        render(layout: layout) unless layout.nil?

        @notification = notification
        @renderer = renderer

        mail({
          to: to || notification.target.email,
          from: from
        }.merge(mail_options))
      end
      # rubocop:enable Metrics/ParameterLists
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
notification-pusher-actionmailer-3.0.2 app/mailers/notification_pusher/action_mailer/notification_mailer.rb
notification-pusher-actionmailer-2.0.0 app/mailers/notification_pusher/action_mailer/notification_mailer.rb