Sha256: 2d3041feaccd702ccee8ba687500a8b5525201320f6b558293695e161ce09f71

Contents?: true

Size: 490 Bytes

Versions: 7

Compression:

Stored size: 490 Bytes

Contents

require 'action_mailer'

module ARMailer
  class << self
    def enable
      enable_actionmailer
    end
    
    # mixes in ActionMailer::ARMailer in ActionMailer::Base
    def enable_actionmailer
      return if ActionMailer::Base.instance_methods.include? 'perform_delivery_activerecord'
      require 'action_mailer/ar_mailer'
      ActionMailer::Base.class_eval { include ActionMailer::ARMailer }
    end
  end
end

if defined?(Rails) and defined?(ActionMailer)
  ARMailer.enable
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
cyu-ar_mailer-1.4.4 lib/ar_mailer.rb
cyu-ar_mailer-1.4.5 lib/ar_mailer.rb
cyu-ar_mailer-1.4.6 lib/ar_mailer.rb
cyu-ar_mailer-1.4.7 lib/ar_mailer.rb
cyu-ar_mailer-1.4.8.1 lib/ar_mailer.rb
cyu-ar_mailer-1.4.8 lib/ar_mailer.rb
synewaves-ar_mailer-1.4.8 lib/ar_mailer.rb