Sha256: d91670b02d2fcdd858fa2f96fefa4ec49bfe7a32cd10179630a501de9b99a837

Contents?: true

Size: 526 Bytes

Versions: 62

Compression:

Stored size: 526 Bytes

Contents

app = Rails.application

app.config.to_prepare do
  if app.config.action_mailer.show_previews
    paths = %w(
      test/mailers/previews/**/*_preview*.rb
      lib/workarea/mailer_previews/**/*_preview*.rb
    )

    Workarea::Plugin.installed.each do |plugin|
      paths.each do |path|
        Dir.glob("#{plugin.root}/#{path}") { |file| load file }
      end
    end

    if preview_path = app.config.action_mailer.preview_path
      Dir["#{preview_path}/**/*_preview.rb"].sort.each { |file| load file }
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 config/initializers/19_mailer_previews.rb
workarea-core-3.5.26 config/initializers/19_mailer_previews.rb
workarea-core-3.4.45 config/initializers/19_mailer_previews.rb
workarea-core-3.5.25 config/initializers/19_mailer_previews.rb
workarea-core-3.5.23 config/initializers/19_mailer_previews.rb
workarea-core-3.4.44 config/initializers/19_mailer_previews.rb
workarea-core-3.5.22 config/initializers/19_mailer_previews.rb
workarea-core-3.4.43 config/initializers/19_mailer_previews.rb
workarea-core-3.5.21 config/initializers/19_mailer_previews.rb
workarea-core-3.4.42 config/initializers/19_mailer_previews.rb
workarea-core-3.5.20 config/initializers/19_mailer_previews.rb
workarea-core-3.4.41 config/initializers/19_mailer_previews.rb
workarea-core-3.5.19 config/initializers/19_mailer_previews.rb
workarea-core-3.4.40 config/initializers/19_mailer_previews.rb
workarea-core-3.5.18 config/initializers/19_mailer_previews.rb
workarea-core-3.4.39 config/initializers/19_mailer_previews.rb
workarea-core-3.5.17 config/initializers/19_mailer_previews.rb
workarea-core-3.4.38 config/initializers/19_mailer_previews.rb
workarea-core-3.5.16 config/initializers/19_mailer_previews.rb
workarea-core-3.4.37 config/initializers/19_mailer_previews.rb