Sha256: c8c8dc590bf19393fa470c1993936bda8ea31bc55e8f82f84dfd7b4cdeabf9fa

Contents?: true

Size: 567 Bytes

Versions: 21

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

require "rails_email_preview"

module NeetoCommonsBackend
  module Initializers
    class << self
      def rails_email_preview
        RailsEmailPreview.setup do |config|
          config.before_render do |message, _preview_class_name, _mailer_action|
            Premailer::Rails::Hook.delivering_email(message)
          end
        end

        Rails.application.config.to_prepare do
          RailsEmailPreview.preview_classes = RailsEmailPreview.find_preview_classes("app/mailer_previews")
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.108 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.107 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.106 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.105 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.104 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.103 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.102 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.101 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.100 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.99 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.98 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.97 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.96 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.95 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.94 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.93 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.92 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.91 lib/neeto_commons_backend/initializers/rails_email_preview.rb
neeto-commons-backend-1.0.90 lib/neeto_commons_backend/initializers/rails_email_preview.rb