Sha256: 954d68a0f895f76af4892ec668adb3f1f7fdf0a38d46f7e67612c2aa1c1cb152

Contents?: true

Size: 552 Bytes

Versions: 2

Compression:

Stored size: 552 Bytes

Contents

module EmailPrefixer
  class Railtie < ::Rails::Railtie
    initializer 'email_prefixer.configure_defaults' do |app|
      config = EmailPrefixer.configure do |config|
        config.application_name ||= app.class.parent_name
        config.stage_name ||= Rails.env
        config.builder ||= EmailPrefixer::Configuration::DEFAULT_BUILDER
      end
      interceptor = EmailPrefixer::Interceptor.new(config)
      ActionMailer::Base.register_preview_interceptor(interceptor)
      ActionMailer::Base.register_interceptor(interceptor)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
email_prefixer-1.2.0 lib/email_prefixer/railtie.rb
email_prefixer-1.2.0.pre.1 lib/email_prefixer/railtie.rb