Sha256: d20fa04f26d6e4268a8825d8cb2999dd6e1918cffcfb0dc7d23843abd46cfb85

Contents?: true

Size: 330 Bytes

Versions: 3

Compression:

Stored size: 330 Bytes

Contents

ActionMailer::Base.class_eval do

  @@override_recipients = nil
  cattr_accessor :override_recipients

  def deliver_with_override!(mail = @mail)
    if override_recipients.present?
      mail.override_recipients! override_recipients
    end
    deliver_without_override! mail
  end
  alias_method_chain :deliver!, :override

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mail_magnet-0.2.0 lib/mail_magnet/action_mailer_ext.rb
mail_magnet-0.1.1 lib/mail_magnet/action_mailer_ext.rb
mail_magnet-0.1.0 lib/mail_magnet/action_mailer_ext.rb