Sha256: 9ba2746e25a7ca3ea407c7d43df53a56423012caeba0a0c9752e3e90fd00955a

Contents?: true

Size: 857 Bytes

Versions: 3

Compression:

Stored size: 857 Bytes

Contents

# frozen_string_literal: true

require 'letter_opener'
require 'letter_opener_web/delivery_method'

module LetterOpenerWeb
  class Engine < ::Rails::Engine
    isolate_namespace LetterOpenerWeb

    initializer 'letter_opener_web.add_delivery_method' do
      ActiveSupport.on_load :action_mailer do
        ActionMailer::Base.add_delivery_method(
          :letter_opener_web,
          LetterOpenerWeb::DeliveryMethod,
          location: LetterOpenerWeb.config.letters_location
        )
      end
    end

    initializer 'assets' do |_app|
      Rails.application.config.assets.precompile += %w[
        letter_opener_web/application.js
        letter_opener_web/application.css
        letter_opener_web/glyphicons-halflings.png
        letter_opener_web/glyphicons-halflings-white.png
        letter_opener_web/blue-dot.ico
      ]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
letter_opener_web-1.3.4 lib/letter_opener_web/engine.rb
letter_opener_web-1.3.3 lib/letter_opener_web/engine.rb
letter_opener_web-1.3.2 lib/letter_opener_web/engine.rb