Skip to content

Use with Rails Engine

jmarceli edited this page May 2, 2016 · 1 revision

Enable Flash middleware inside Engine configuration:

lib/somenamespace/core/engine.rb

module Somenamespacce
  module Core
    class Engine < ::Rails::Engine
      config.middleware.use ActionDispatch::Flash
    end
  end
end

Define your mailer_previews inside spec/dummy/app/ (or test/dummy/app/ if you are not using RSpec) e.g. spec/dummy/app/mailer_previews/somenamespace/order_mailer_preview.rb

Clone this wiki locally