Sha256: 4b7d9529bd9270f2550dff8981c51f1ae11c919a70a235e51b86e25904aa4db3
Contents?: true
Size: 881 Bytes
Versions: 17
Compression:
Stored size: 881 Bytes
Contents
# frozen_string_literal: true module Emailbutler module Mailers module Helpers extend ActiveSupport::Concern include Emailbutler::Helpers included do after_action :save_emailbutler_message end private def process_action(*args) build_emailbutler_message(args) super end def build_emailbutler_message(args) @emailbutler_message = Emailbutler.build_message( mailer: self.class.to_s, action: action_name, params: serialize({ mailer_params: params, action_params: args[1..] }, false) ) end def save_emailbutler_message message.message_id = @emailbutler_message.uuid Emailbutler.set_message_attribute(@emailbutler_message, :send_to, message.to) Emailbutler.save_message(@emailbutler_message) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems