Sha256: e573fe755f2d88de5588ad276b9fab637ec84c7b96eaa556ee3c5520412f177f

Contents?: true

Size: 525 Bytes

Versions: 3

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

module Mail
  module Notify
    class Mailer < ActionMailer::Base
      def view_mail(template_id, headers)
        raise ArgumentError, 'You must specify a template ID' if template_id.blank?

        mail(headers.merge(template_id: template_id))
      end

      def template_mail(template_id, headers)
        raise ArgumentError, 'You must specify a template ID' if template_id.blank?

        mail(headers.merge(body: '', subject: '', template_id: template_id))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mail-notify-1.0 lib/mail/notify/mailer.rb
mail-notify-0.2.3 lib/mail/notify/mailer.rb
mail-notify-0.2.2 lib/mail/notify/mailer.rb