Sha256: 2cf77db4a547510e916b3aa53cd15f4d3b01bade69d9144309b0ca8cdbed1619

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

module AhoyEmail
  class Engine < ::Rails::Engine
    initializer "ahoy_email" do |app|
      secrets = app.respond_to?(:secrets) ? app.secrets : app.config
      AhoyEmail.secret_token ||= secrets.respond_to?(:secret_key_base) ? secrets.secret_key_base : secrets.secret_token
      AhoyEmail.belongs_to = {optional: true} if Rails::VERSION::MAJOR >= 5
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ahoy_email-0.5.0 lib/ahoy_email/engine.rb
ahoy_email-0.4.0 lib/ahoy_email/engine.rb