lib/mail/notify/personalisation.rb in mail-notify-1.0.4 vs lib/mail/notify/personalisation.rb in mail-notify-1.0.5

- old
+ new

@@ -1,17 +1,21 @@ # frozen_string_literal: true module Mail module Notify class Personalisation + BLANK = Object.new + def initialize(mail) @body = mail.body.raw_source @subject = mail.subject @personalisation = mail[:personalisation]&.unparsed_value || {} end def to_h - merged_options.reject { |_k, v| v.blank? } + merged_options + .reject { |_k, v| v.blank? } + .transform_values { |value| value == BLANK ? "" : value } end private def merged_options