Sha256: 1e486fff1299ffeeac73e620721d7e7a38b6905e7f3fd0a55ad930a1545c2045

Contents?: true

Size: 802 Bytes

Versions: 6

Compression:

Stored size: 802 Bytes

Contents

require 'premailer'
require 'action_mailer'

require 'premailer/rails/version'
require 'premailer/rails/css_loaders'
require 'premailer/rails/css_helper'
require 'premailer/rails/customized_premailer'
require 'premailer/rails/hook'

class Premailer
  module Rails
    @config = {
      input_encoding: 'UTF-8',
      generate_text_part: true,
      strategies: [:filesystem, :asset_pipeline, :network]
    }
    class << self
      attr_accessor :config
    end

    def self.register_interceptors
      ActionMailer::Base.register_interceptor(Premailer::Rails::Hook)

      if ActionMailer::Base.respond_to?(:register_preview_interceptor)
        ActionMailer::Base.register_preview_interceptor(Premailer::Rails::Hook)
      end
    end
  end
end

require 'premailer/rails/railtie' if defined?(Rails)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
premailer-rails-1.11.1 lib/premailer/rails.rb
premailer-rails-1.11.0 lib/premailer/rails.rb
premailer-rails-1.10.3 lib/premailer/rails.rb
premailer-rails-1.10.2 lib/premailer/rails.rb
premailer-rails-1.10.1 lib/premailer/rails.rb
premailer-rails-1.10.0 lib/premailer/rails.rb