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.15 config/initializers/19_mailer_previews.rb
workarea-core-3.4.36 config/initializers/19_mailer_previews.rb
workarea-core-3.5.14 config/initializers/19_mailer_previews.rb
workarea-core-3.4.35 config/initializers/19_mailer_previews.rb
workarea-core-3.5.13 config/initializers/19_mailer_previews.rb
workarea-core-3.4.34 config/initializers/19_mailer_previews.rb
workarea-core-3.5.12 config/initializers/19_mailer_previews.rb
workarea-core-3.4.33 config/initializers/19_mailer_previews.rb
workarea-core-3.5.11 config/initializers/19_mailer_previews.rb
workarea-core-3.5.10 config/initializers/19_mailer_previews.rb
workarea-core-3.4.32 config/initializers/19_mailer_previews.rb
workarea-core-3.5.9 config/initializers/19_mailer_previews.rb
workarea-core-3.4.31 config/initializers/19_mailer_previews.rb
workarea-core-3.5.8 config/initializers/19_mailer_previews.rb
workarea-core-3.4.30 config/initializers/19_mailer_previews.rb
workarea-core-3.5.7 config/initializers/19_mailer_previews.rb
workarea-core-3.4.29 config/initializers/19_mailer_previews.rb
workarea-core-3.5.6 config/initializers/19_mailer_previews.rb
workarea-core-3.4.28 config/initializers/19_mailer_previews.rb
workarea-core-3.5.5 config/initializers/19_mailer_previews.rb