Sha256: ae59cd0b7a62f6b9c7df0073aa69efd676eb274edfde0d6f53991a1c68a761b2

Contents?: true

Size: 568 Bytes

Versions: 5

Compression:

Stored size: 568 Bytes

Contents

module Roadie
  module Rails
    # Extend instances of Mail with this to have it inlined automatically when
    # delivered. You'll need to assign some #roadie_options for it to actually
    # do anything.
    module InlineOnDelivery
      attr_accessor :roadie_options

      def deliver
        inline_styles
        super
      end

      def deliver!
        inline_styles
        super
      end

      private

      def inline_styles
        if (options = roadie_options)
          MailInliner.new(self, options).execute
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roadie-rails-1.3.0 lib/roadie/rails/inline_on_delivery.rb
roadie-rails-1.2.1 lib/roadie/rails/inline_on_delivery.rb
roadie-rails-1.2.0 lib/roadie/rails/inline_on_delivery.rb
roadie-rails-1.1.1 lib/roadie/rails/inline_on_delivery.rb
roadie-rails-1.1.0 lib/roadie/rails/inline_on_delivery.rb