9ad57fde2a
This fixes an error message on app startup about autoloaded constants: > DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper. The reason for this error is that the Mailjet gem forces the immediate loading of `action_mailer`. Which leads to the following sequence of events: On app init, when bundler requires all the gems in the Gemfile: - The Mailjet gem is required, - It loads `ActionMailer::Base`. Later, when Rails initializes itself: - `ActionText` creates an `action_text.helpers` initializer, - This initializer register hooks to add `ActionText` helpers when either `action_controller_base` or `action_mailer` are loaded, - But as `action_mailer` has already been loaded, the hook is trigerred immediately, - ActiveSupport::Dependencies notices `ActionText` constants do not exist yet, auto-load them, and add the constants to `ActiveSupport::Dependencies.autoloaded_constants`. And even later, at the end of the Rails initialization process: - The `:warn_if_autoloaded` initializer is run, - It notices that `autoloaded_constants` is not empty, and prints the warning message. See https://github.com/mailjet/mailjet-gem/issues/213 |
||
---|---|---|
.. | ||
environments | ||
initializers | ||
locales | ||
webpack | ||
application.rb | ||
boot.rb | ||
brakeman.ignore | ||
cable.yml | ||
database.yml | ||
deploy.rb | ||
env.example | ||
env.example.optional | ||
environment.rb | ||
i18n-tasks.yml | ||
puma.rb | ||
routes.rb | ||
secrets.yml | ||
skylight.yml | ||
spring.rb | ||
storage.yml | ||
webpacker.yml |