Sha256: 8e31aeec42de2d27bdaa1c1d7c586d09fe399b4237090805757742b6196fc572

Contents?: true

Size: 447 Bytes

Versions: 5

Compression:

Stored size: 447 Bytes

Contents

require 'abstract_controller'
require 'action_mailer'

module AwesomeMailer
  class Base < ActionMailer::Base
    abstract!
    include ActionView::Helpers::AssetTagHelper::StylesheetTagHelpers
    include ActionView::Helpers::AssetTagHelper::JavascriptTagHelpers
    include AbstractController::UrlFor

    def render(*arguments)
      return super unless formats.include? :html
      AwesomeMailer::Renderer.new(super).to_html
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
awesomemailer-0.2.3 lib/awesome_mailer/base.rb
awesomemailer-0.2.2 lib/awesome_mailer/base.rb
awesomemailer-0.2.1 lib/awesome_mailer/base.rb
awesomemailer-0.2.0 lib/awesome_mailer/base.rb
awesomemailer-0.1.4 lib/awesome_mailer/base.rb